https://leetcode.com/problems/number-of-zigzag-arrays-ii/description/?envType=daily-question&envId=2026-06-24
Today's leetcode daily problem was too hard, but awaring of matrix exponentiation mitigate it enough.
Looked as always to find out which approach i should use for solving problem.
Yesterday I solved 1st version, it was simple DP
But on this i tried to find relation between dp states using matrices.
If you're interested, i'll leave my approach to find the relation for matrix multiplication
If you're interested solving this kind of problem, i suggest you the problem: find nth fibonacci in O(logn) with matrix exponentiation, or you can find relation formula between 2n and n fibonacci sequences
Today's leetcode daily problem was too hard, but awaring of matrix exponentiation mitigate it enough.
Looked as always to find out which approach i should use for solving problem.
Yesterday I solved 1st version, it was simple DP
But on this i tried to find relation between dp states using matrices.
If you're interested, i'll leave my approach to find the relation for matrix multiplication
If you're interested solving this kind of problem, i suggest you the problem: find nth fibonacci in O(logn) with matrix exponentiation, or you can find relation formula between 2n and n fibonacci sequences
LeetCode
Number of ZigZag Arrays II - LeetCode
Can you solve this real interview question? Number of ZigZag Arrays II - You are given three integers n, l, and r.
A ZigZag array of length n is defined as follows:
* Each element lies in the range [l, r].
* No two adjacent elements are equal.
* No three…
A ZigZag array of length n is defined as follows:
* Each element lies in the range [l, r].
* No two adjacent elements are equal.
* No three…
https://leetcode.com/problems/count-subarrays-with-majority-element-ii/
Today's daily problem 2nd version (hard). I solved it before. But with the help of looking topic, hints. But, in this time, i tried solving it completely without any topic looking, because this small action affects solving problem, in contests.
Recently I've figured out that i've started looking at problem's hints, topics even when it seemed slightly confused, and this is a bad habit, which makes brain work very lazily. I've felt the difference between hackerrank and leetcode when solving SQL problems in hackerrank, it isn't that much user friendly comfortable when we solve problem, we can look at hints, topics, so thinking clearly, taking notes, even writing raw solution in notepad would be quite helpful to prevent distraction, think clear
Today's daily problem 2nd version (hard). I solved it before. But with the help of looking topic, hints. But, in this time, i tried solving it completely without any topic looking, because this small action affects solving problem, in contests.
Recently I've figured out that i've started looking at problem's hints, topics even when it seemed slightly confused, and this is a bad habit, which makes brain work very lazily. I've felt the difference between hackerrank and leetcode when solving SQL problems in hackerrank, it isn't that much user friendly comfortable when we solve problem, we can look at hints, topics, so thinking clearly, taking notes, even writing raw solution in notepad would be quite helpful to prevent distraction, think clear
LeetCode
Count Subarrays With Majority Element II - LeetCode
Can you solve this real interview question? Count Subarrays With Majority Element II - You are given an integer array nums and an integer target.
Return the number of subarrays of nums in which target is the majority element.
The majority element of a subarray…
Return the number of subarrays of nums in which target is the majority element.
The majority element of a subarray…
🔥1
Forwarded from MDC Uzbekistan
🚀 Join us at Data Fest 2026!
Microsoft Developers Community Uzbekistan invites you to join Data Fest 2026 — a full-day event dedicated to Data and BI Analytics.
Whether you’re a student, developer, data professional, or simply interested in the latest technologies, this is an opportunity to discover real-world use cases and connect with the local data community.
Learn from industry experts, including a Microsoft Fabric Lead at H&M, a former Staff Software Engineer at Dropbox, and other tech leaders who will share practical insights and the latest trends in Data and BI Analytics.
📅 Date: 18 July 2026
🕘 Time: 9:00 AM
📍 Location: The Ministry of Digital Technologies, Muminov Street, 7/2
Register now to secure your spot.
🔗 Register here: https://mdcuzbekistan.com/register
We look forward to seeing you at Data Fest 2026!
#MDCUzbekistan #DataFest2026 #PowerBI #DataAnalytics #BusinessIntelligence
Microsoft Developers Community Uzbekistan invites you to join Data Fest 2026 — a full-day event dedicated to Data and BI Analytics.
Whether you’re a student, developer, data professional, or simply interested in the latest technologies, this is an opportunity to discover real-world use cases and connect with the local data community.
Learn from industry experts, including a Microsoft Fabric Lead at H&M, a former Staff Software Engineer at Dropbox, and other tech leaders who will share practical insights and the latest trends in Data and BI Analytics.
📅 Date: 18 July 2026
🕘 Time: 9:00 AM
📍 Location: The Ministry of Digital Technologies, Muminov Street, 7/2
Register now to secure your spot.
🔗 Register here: https://mdcuzbekistan.com/register
We look forward to seeing you at Data Fest 2026!
#MDCUzbekistan #DataFest2026 #PowerBI #DataAnalytics #BusinessIntelligence
❤1
Forwarded from Azimjon's Fikrlog
30-iyun.
Vaqtdan vaqtning farqi bor.
Yoshlikdagi vaqt qarilikdagi vaqtdan qadrliroq.
Ilm olish, yaxshi odatlar qurish, yaqin do’stlar orttirish uchun yoshlikdan yaxshiroq vaqt yo’q.
Majbur bo’lmasangiz bu vaqtni pulga almashmang. Shunchaki pul topish uchun vaqtingizni sarflamang.
Hali ko’p pul topasiz.
Yoshlikni qaytib topmaysiz.
Vaqtni sarmoya qiling, xarajat emas.
Yoshlarga maslahatim: t.me/azim_pulat/s/42
Kuningiz bilan, yoshlar!
Vaqtdan vaqtning farqi bor.
Yoshlikdagi vaqt qarilikdagi vaqtdan qadrliroq.
Ilm olish, yaxshi odatlar qurish, yaqin do’stlar orttirish uchun yoshlikdan yaxshiroq vaqt yo’q.
Majbur bo’lmasangiz bu vaqtni pulga almashmang. Shunchaki pul topish uchun vaqtingizni sarflamang.
Hali ko’p pul topasiz.
Yoshlikni qaytib topmaysiz.
Vaqtni sarmoya qiling, xarajat emas.
Yoshlarga maslahatim: t.me/azim_pulat/s/42
Kuningiz bilan, yoshlar!
Forwarded from Hasanali Turdaliyev
Endi buyog'iga bu kabi robotlarni(yoki moshinacha deyish kerakmi) ko'p ko'ramiz
Xitoyda juda ommalashib ketgan.
Bular endi kuryer akalarimiz o'rniga ovqat yana bir narsalar tashiydi.
Menga lekin ko'rinishi yoqdi. Biznikilar avaylab ishlatsa bo'ldi😭
— Hasanali
Xitoyda juda ommalashib ketgan.
Bular endi kuryer akalarimiz o'rniga ovqat yana bir narsalar tashiydi.
Menga lekin ko'rinishi yoqdi. Biznikilar avaylab ishlatsa bo'ldi
— Hasanali
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Юля Караваева
РАЗГОНЯЙСЯ — летний челлендж на CodeRun стартовал
Присоединяйся к CodeRun Summer Challenge — залетай в топ, скипай контест и получай призы от Яндекса.
Стартовать можно в своём направлении разработки. Челлендж длится с 1 по 17 июля.
Призы:
— топ-1 по каждому из 11 языков → мерч-пак CodeRun
— топ-3 общего зачёта → коллекционный лего-набор
— топ-200 общего зачёта → скип контеста + пробное интервью в Яндекс
Участвуй: coderun.yandex.ru/seasons/2026-summer
Присоединяйся к CodeRun Summer Challenge — залетай в топ, скипай контест и получай призы от Яндекса.
Как всё устроено:
— 15 задач от лёгких к сложным
— выходят по 5 штук каждые 5 дней
— общий зачёт + 11 лидербордов по языкам
Стартовать можно в своём направлении разработки. Челлендж длится с 1 по 17 июля.
Разгоняй свои решения до предельных скоростей
Performance engineering — главный навык челленджа. Быстрый и эффективный код даёт больше баллов — важно не просто решить, решить эффективно.
Призы:
— топ-1 по каждому из 11 языков → мерч-пак CodeRun
— топ-3 общего зачёта → коллекционный лего-набор
— топ-200 общего зачёта → скип контеста + пробное интервью в Яндекс
Участвуй: coderun.yandex.ru/seasons/2026-summer
2 days ago started solving coderun problems, problems are not easy, require strong optimization, especially the last, fifth one:
https://coderun.yandex.ru/seasons/2026-summer/tracks/common/problem/the-map-of-hot-spots
Researched topic of problem and which data structure aligns with problem condition:
Fenwick tree 2d + offline processing (sorting)
Opened bunch (nearly 10) tabs and looked up similar problems and their solution approach, struggled till night, the next morning, finally after long debugging process, solved problem. There was also mentioned about merge sort tree, but didn't come up with idea how i can apply it to solve this problem.
I can conclude about fenwick tree in the following:
It's very alike to prefix sum structure,
I've figured i understood wrongly about fenwick, so i can't write it here, but if it is interesting, you can look at cp page about fenwick: https://cp-algorithms.com/data_structures/fenwick.html
All the thing i accomplished to solve problem faster was just taking at look what problems can it solve, remembered implementation (after solving enough amount of problems you realize yourself why it's written like this or try to understand), so, in short, it's black box method here (https://www.youtube.com/watch?v=RDzsrmMl48I)
P.S: Previously, i read about Fenwick and saw it's implementation, maybe it can mitigate fear from solving this problem.
https://coderun.yandex.ru/seasons/2026-summer/tracks/common/problem/the-map-of-hot-spots
Researched topic of problem and which data structure aligns with problem condition:
Fenwick tree 2d + offline processing (sorting)
Opened bunch (nearly 10) tabs and looked up similar problems and their solution approach, struggled till night, the next morning, finally after long debugging process, solved problem. There was also mentioned about merge sort tree, but didn't come up with idea how i can apply it to solve this problem.
I can conclude about fenwick tree in the following:
It's very alike to prefix sum structure,
I've figured i understood wrongly about fenwick, so i can't write it here, but if it is interesting, you can look at cp page about fenwick: https://cp-algorithms.com/data_structures/fenwick.html
All the thing i accomplished to solve problem faster was just taking at look what problems can it solve, remembered implementation (after solving enough amount of problems you realize yourself why it's written like this or try to understand), so, in short, it's black box method here (https://www.youtube.com/watch?v=RDzsrmMl48I)
P.S: Previously, i read about Fenwick and saw it's implementation, maybe it can mitigate fear from solving this problem.
Sometimes, not everything works as you wish, try, i need to learn from mistakes, mistakes can tell a lot of things where you lack, but i'm a very lazy person, and it requires analysis much enough 😅
Forwarded from Webmakon | AI
#dasturlash
💻 Dasturlashni haqiqiy tizimlarni yaratish orqali o'rganing — 80+ bepul kurslar.
Ship That Code platformasida murakkab texnologiyalarni amaliyot orqali o'rganishingiz mumkin. Bu yerda Git va Redis'dan tortib Database, Game Engine va hatto Operating System Kernel'ni noldan yaratishni o'rganasiz.
Platforma quyidagi imkoniyatlarni taqdim etadi:
• 80 dan ortiq interaktiv kurs.
• 14 ta karyera yo'nalishi.
• Kodni brauzerning o'zida yozish va ishga tushirish.
•Yozgan kodingizni AI orqali avtomatik tekshirish va uni yaxshilash bo'yicha tavsiyalar olish.
🛸Doʻstlaringizga ham ulashishni unutmang!
@webmakon
💻 Dasturlashni haqiqiy tizimlarni yaratish orqali o'rganing — 80+ bepul kurslar.
Ship That Code platformasida murakkab texnologiyalarni amaliyot orqali o'rganishingiz mumkin. Bu yerda Git va Redis'dan tortib Database, Game Engine va hatto Operating System Kernel'ni noldan yaratishni o'rganasiz.
Platforma quyidagi imkoniyatlarni taqdim etadi:
• 80 dan ortiq interaktiv kurs.
• 14 ta karyera yo'nalishi.
• Kodni brauzerning o'zida yozish va ishga tushirish.
•Yozgan kodingizni AI orqali avtomatik tekshirish va uni yaxshilash bo'yicha tavsiyalar olish.
🛸Doʻstlaringizga ham ulashishni unutmang!
@webmakon
👍1
Forwarded from MDC Uzbekistan
🚀 Meet the Speakers of Data Fest 2026
Data Fest 2026 brings together experts from H&M Group, Dropbox, Google, and DOMO to share practical insights on data, AI, analytics, and software engineering.
🎤 Firdavs Alinazarov
Microsoft Fabric & Power BI Technology Leader at H&M Group
AI & Agentic Analytics in Power BI and Fabric: Essential Skills Data Analysts Must Master
🎤 Otabek Nurmuhammad
Building Infrastructure Inference for AI Agents | Ex-Staff Software Engineer @ Dropbox, Google | Co-Founder @ 42.uz
Don’t GPT Everything
🎤 Ibrokhim Jalolov
Data/Software Engineer at DOMO
Analyze Data with AI
Join us to hear practical insights from professionals building data platforms, AI systems, and products used by millions of users worldwide.
📅 July 18, 2026
🕘 9:00 AM
📍 Ministry of Digital Technologies, Tashkent
🎟️ Registration is open
#DataFest2026 #DataAnalytics #PowerBI #MicrosoftFabric #BusinessIntelligence
@mdcuzbekistan
Data Fest 2026 brings together experts from H&M Group, Dropbox, Google, and DOMO to share practical insights on data, AI, analytics, and software engineering.
🎤 Firdavs Alinazarov
Microsoft Fabric & Power BI Technology Leader at H&M Group
AI & Agentic Analytics in Power BI and Fabric: Essential Skills Data Analysts Must Master
🎤 Otabek Nurmuhammad
Building Infrastructure Inference for AI Agents | Ex-Staff Software Engineer @ Dropbox, Google | Co-Founder @ 42.uz
Don’t GPT Everything
🎤 Ibrokhim Jalolov
Data/Software Engineer at DOMO
Analyze Data with AI
Join us to hear practical insights from professionals building data platforms, AI systems, and products used by millions of users worldwide.
📅 July 18, 2026
🕘 9:00 AM
📍 Ministry of Digital Technologies, Tashkent
🎟️ Registration is open
#DataFest2026 #DataAnalytics #PowerBI #MicrosoftFabric #BusinessIntelligence
@mdcuzbekistan
❤🔥1
Forwarded from 🍇 Dasturchining kundaligi
📚 Kitoblar almashish uchun platforma ishga tushdi!
Ushbu platformada o'zingiz o'qib bo'lgan kitoblarni kiritishingiz, ijaraga berishingiz va qolgan kitobxonlardan kitoblarni ijaraga olib turishingiz mumkin.
Platformadan foydalanish ikki taraf uchun ham mutlaqo bepul.
Kiring, foydalaning va ziyo ulashing!
@ziyoulashbot
Loyiha to'liq bepul bo'lgani sababli, imkon bo'lsa loyihani boshqa kitobxonlar bilan ulashishni unutmang.
Ushbu platformada o'zingiz o'qib bo'lgan kitoblarni kiritishingiz, ijaraga berishingiz va qolgan kitobxonlardan kitoblarni ijaraga olib turishingiz mumkin.
Platformadan foydalanish ikki taraf uchun ham mutlaqo bepul.
Kiring, foydalaning va ziyo ulashing!
@ziyoulashbot
Loyiha to'liq bepul bo'lgani sababli, imkon bo'lsa loyihani boshqa kitobxonlar bilan ulashishni unutmang.
Forwarded from C++ Academy
Cuckoo hashing даёт O(1) lookup в худшем случае
Не амортизированно.
Не «в среднем».
А именно worst case.
Идея красивая: у каждого ключа есть ровно две возможные позиции в таблице.
Поэтому поиск тупо проверяет оба места и заканчивается.
Вставка работает интереснее: если место занято, новый ключ «выталкивает» старый в его альтернативную позицию.
Отсюда и название: как кукушка, которая выкидывает чужие яйца из гнезда.
Если начинается цикл, таблицу перестраивают с новыми хеш-функциями.
Алгоритм предложили Rasmus Pagh и Flemming Rodler в 2001 году.
И это не просто академическая штука: Linux kernel использует cuckoo hashing в connection tracking table.
Один из тех случаев, когда простая идея даёт очень сильную гарантию по lookup.
Не амортизированно.
Не «в среднем».
А именно worst case.
Идея красивая: у каждого ключа есть ровно две возможные позиции в таблице.
Поэтому поиск тупо проверяет оба места и заканчивается.
return table1[h1(key)] == key
|| table2[h2(key)] == key;
Вставка работает интереснее: если место занято, новый ключ «выталкивает» старый в его альтернативную позицию.
Отсюда и название: как кукушка, которая выкидывает чужие яйца из гнезда.
Если начинается цикл, таблицу перестраивают с новыми хеш-функциями.
Алгоритм предложили Rasmus Pagh и Flemming Rodler в 2001 году.
И это не просто академическая штука: Linux kernel использует cuckoo hashing в connection tracking table.
Один из тех случаев, когда простая идея даёт очень сильную гарантию по lookup.
Forwarded from Unilance
#data
📊 TBC Uzbekistan Data Analytics 3.0 dasturiga qabul boshlandi!
TBC Uzbekistan Data Analytics 3.0 bepul ta'lim dasturiga arizalar qabul qilmoqda. Dastur talabalar va yaqinda universitetni tamomlagan bitiruvchilar uchun mo'ljallangan bo'lib, Data Analytics sohasida karyera boshlashni istaganlar uchun ajoyib imkoniyat.
5 oy davomida siz:
• TBC Uzbekistan mutaxassislaridan ta'lim olasiz
• Haqiqiy biznes loyihalari ustida ishlaysiz
• Amaliy data analytics ko'nikmalarini egallaysiz
• Dasturni muvaffaqiyatli yakunlagach, TBC Uzbekistan jamoasiga qo'shilish imkoniyatiga ega bo'lasiz
🔥Agar siz qiziquvchan, tahliliy fikrlaydigan va rivojlanishga tayyor bo'lsangiz, bu imkoniyat aynan siz uchun!
@unilance - eng yaxshisi siz uchun
📊 TBC Uzbekistan Data Analytics 3.0 dasturiga qabul boshlandi!
TBC Uzbekistan Data Analytics 3.0 bepul ta'lim dasturiga arizalar qabul qilmoqda. Dastur talabalar va yaqinda universitetni tamomlagan bitiruvchilar uchun mo'ljallangan bo'lib, Data Analytics sohasida karyera boshlashni istaganlar uchun ajoyib imkoniyat.
5 oy davomida siz:
• TBC Uzbekistan mutaxassislaridan ta'lim olasiz
• Haqiqiy biznes loyihalari ustida ishlaysiz
• Amaliy data analytics ko'nikmalarini egallaysiz
• Dasturni muvaffaqiyatli yakunlagach, TBC Uzbekistan jamoasiga qo'shilish imkoniyatiga ega bo'lasiz
🔥Agar siz qiziquvchan, tahliliy fikrlaydigan va rivojlanishga tayyor bo'lsangiz, bu imkoniyat aynan siz uchun!
@unilance - eng yaxshisi siz uchun