Daily
Don't read if you solved yesterday's daily. It is exactly the same, except n^3 will not work here due to constraints, thus labeled as hard.
https://leetcode.com/problems/find-the-number-of-ways-to-place-people-ii/description/?envType=daily-question&envId=2025-09-03
Don't read if you solved yesterday's daily. It is exactly the same, except n^3 will not work here due to constraints, thus labeled as hard.
https://leetcode.com/problems/find-the-number-of-ways-to-place-people-ii/description/?envType=daily-question&envId=2025-09-03
Solution
Hint1:try sorting.
Hint2:the solution should be O(n^2)
Hint3:sort by x asc and then by y desc. Basically you can observe that next x is always bigger or same as previous. Now whenever previous y was higher than current y - you cannot count it as previous y for sure will be inside the rectangle.
===
Didn't come up with it on my own. Had to see the solution. In a nutshell, as per last hint, we just track change of Y between current and previous. If current is higher we count one. This way we make sure there is no point inside the rectangle
Hint1:
Hint2:
Hint3:
===
Didn't come up with it on my own. Had to see the solution.
extremely good advice would be (for job security) - go and start working on some OOOOOLLLD legacy, that brings money, and literally not replaceable. You will never be replaced. You can only be laid off, or dropped in case project got replacement and stopped bringing money
β€8
andreyka26_se
extremely good advice would be (for job security) - go and start working on some OOOOOLLLD legacy, that brings money, and literally not replaceable. You will never be replaced. You can only be laid off, or dropped in case project got replacement and stoppedβ¦
Or, spend time on grinding your interview skill (leetcode, system design, intw questions), to feel extra confident and know that even in case of drop, in 1 month, you will find something else.
β€8
Daily
Today leetcode is a joke. Literally problem for 40 seconds. Go and collect the coin.
https://leetcode.com/problems/find-closest-person/description/?envType=daily-question&envId=2025-09-04
Today leetcode is a joke. Literally problem for 40 seconds. Go and collect the coin.
https://leetcode.com/problems/find-closest-person/description/?envType=daily-question&envId=2025-09-04
Daily
Mathπ. Was not able to solve on my own.
https://leetcode.com/problems/minimum-operations-to-make-the-integer-zero/description/?envType=daily-question&envId=2025-09-05
Mathπ. Was not able to solve on my own.
https://leetcode.com/problems/minimum-operations-to-make-the-integer-zero/description/?envType=daily-question&envId=2025-09-05
π1π₯1
I added different structure for daily leetcode questions. Now answer with hints will be in comment section instead of separate post. Hope it will make things clearer. I'm 100% sure, maybe 1% of you are doing it with me, but at least for this 1% it will be extra motivation and competitive feeling (this guy did it today, I can do it as well)
β€10
Daily
Bruteforce - quite easy, but we need something better than O(n*m)
Optimized - might be a bit hard
https://leetcode.com/problems/minimum-operations-to-make-array-elements-zero/?envType=daily-question&envId=2025-09-06
Bruteforce - quite easy, but we need something better than O(n*m)
Optimized - might be a bit hard
https://leetcode.com/problems/minimum-operations-to-make-array-elements-zero/?envType=daily-question&envId=2025-09-06
π4
Tomorrow we are streaming during the day: 14-16 UTC + 2
Implementing Redis Sharding POC (basically emulating real redis)
Implementing Redis Sharding POC (basically emulating real redis)
π5
Daily
Easy one, go and collect the coin
https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/description/?envType=daily-question&envId=2025-09-07
#daily
Easy one, go and collect the coin
https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/description/?envType=daily-question&envId=2025-09-07
#daily
π2
Daily
Easy one - go and collect the coin, guys.
https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers/description/?envType=daily-question&envId=2025-09-08
Easy one - go and collect the coin, guys.
https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers/description/?envType=daily-question&envId=2025-09-08
π2
Daily
Today is interesting question. not bullshit math at least.
https://leetcode.com/problems/number-of-people-aware-of-a-secret/?envType=daily-question&envId=2025-09-09
#daily
Today is interesting question. not bullshit math at least.
https://leetcode.com/problems/number-of-people-aware-of-a-secret/?envType=daily-question&envId=2025-09-09
#daily