Daily
Easier than hard if you know the formulas and coecistance of least common multiple (LCM) and greates common divisor (GCD).
https://leetcode.com/problems/replace-non-coprime-numbers-in-array/description/?envType=daily-question&envId=2025-09-16
#daily
Easier than hard if you know the formulas and coecistance of least common multiple (LCM) and greates common divisor (GCD).
https://leetcode.com/problems/replace-non-coprime-numbers-in-array/description/?envType=daily-question&envId=2025-09-16
#daily
Daily
Today is a bit late, was having students for system design.
I liked today's daily a lot. Small hint - think of something like lazy loading + MVCC in postgres, it will lead you to a correct answer.
https://leetcode.com/problems/design-a-food-rating-system/description/?envType=daily-question&envId=2025-09-17
Today is a bit late, was having students for system design.
I liked today's daily a lot. Small hint - think of something like lazy loading + MVCC in postgres, it will lead you to a correct answer.
https://leetcode.com/problems/design-a-food-rating-system/description/?envType=daily-question&envId=2025-09-17
I found system design question, that does not have solutions on the open internet. If you are looking for a challenge in system design - try designing "Virtual waiting room" aka "Virtual waiting queue".
https://www.cloudflare.com/en-gb/application-services/products/waiting-room/
This is the "clever" FIFO sticky rate limiter that is needed for example in case of ticketmaster for Taylor Swift traffic spike (14M req per sec).
How it works: it handles all 14M requests, and in FIFO manner it lets the first users to start booking, but still allowing only static amount of users to book (let's say 20k) simultaneously. While you are in queue your position and how many people before you are shown on the page. Once it is your turn - the page will load ticketmaster seat selection map.
How would you do it?
https://www.cloudflare.com/en-gb/application-services/products/waiting-room/
This is the "clever" FIFO sticky rate limiter that is needed for example in case of ticketmaster for Taylor Swift traffic spike (14M req per sec).
How it works: it handles all 14M requests, and in FIFO manner it lets the first users to start booking, but still allowing only static amount of users to book (let's say 20k) simultaneously. While you are in queue your position and how many people before you are shown on the page. Once it is your turn - the page will load ticketmaster seat selection map.
How would you do it?
Cloudflare
Cloudflare Waiting Room | Virtual waiting rooms | Cloudflare
Cloudflare Waiting Room lets you direct users to a custom-branded virtual 'waiting roomβ during traffic surges, improving their experience while they wait.
β€7
Daily
Pretty similar question to yesterday's. Learning how we can use "soft deletion" to make better complexity
https://leetcode.com/problems/design-task-manager/description/?envType=daily-question&envId=2025-09-18
#daily
Pretty similar question to yesterday's. Learning how we can use "soft deletion" to make better complexity
https://leetcode.com/problems/design-task-manager/description/?envType=daily-question&envId=2025-09-18
#daily
Daily
Easy. Just 1 timesaver: better to use map instead of array
https://leetcode.com/problems/design-spreadsheet/description/?envType=daily-question&envId=2025-09-19
#daily
Easy. Just 1 timesaver: better to use map instead of array
https://leetcode.com/problems/design-spreadsheet/description/?envType=daily-question&envId=2025-09-19
#daily
π₯2
Daily
The actual problem is quite interesting and tests different datastructures.
Also fucking constraints are misleading (I will explain in the solution)
https://leetcode.com/problems/implement-router/description/?envType=daily-question&envId=2025-09-20
However I believe that the amount of code produced here matches rather hard problem.
#daily
The actual problem is quite interesting and tests different datastructures.
Also fucking constraints are misleading (I will explain in the solution)
https://leetcode.com/problems/implement-router/description/?envType=daily-question&envId=2025-09-20
However I believe that the amount of code produced here matches rather hard problem.
#daily
π4
Daily
A bit messy with code, but it is not much harder than yesterday's mid.
However, there is interesting topic for which Datastructures to use here (check solution in comment)
https://leetcode.com/problems/design-movie-rental-system/description/?envType=daily-question&envId=2025-09-21
#daily
A bit messy with code, but it is not much harder than yesterday's mid.
However, there is interesting topic for which Datastructures to use here (check solution in comment)
https://leetcode.com/problems/design-movie-rental-system/description/?envType=daily-question&envId=2025-09-21
#daily
π₯1
Daily
Today is very easy, 2 mins, go and collect coin
https://leetcode.com/problems/count-elements-with-maximum-frequency/description/?envType=daily-question&envId=2025-09-22
#daily
Today is very easy, 2 mins, go and collect coin
https://leetcode.com/problems/count-elements-with-maximum-frequency/description/?envType=daily-question&envId=2025-09-22
#daily
For now, yes, thanks for opening my eyes, apologies, in leetcode there IS a priority queue. It is exposed by library https://datastructures-js.info/docs/priority-queue
This library is kind of preimported for your leetcode question.
This library is kind of preimported for your leetcode question.
How I was doing it before xDD
Actually in real interview you don't have to know this lib and use it. You can just say interviewer: yeah, I know there is a heap DS, it can be implemented using array, it has log(n) complexity bla bla bla, BUT, I will kind of assume this is the heap, and instead use array and sort it after every insert.
Actually in real interview you don't have to know this lib and use it. You can just say interviewer: yeah, I know there is a heap DS, it can be implemented using array, it has log(n) complexity bla bla bla, BUT, I will kind of assume this is the heap, and instead use array and sort it after every insert.