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
Daily
Today quite interesting problem, I liked it, it is legit mid.
https://leetcode.com/problems/minimum-number-of-people-to-teach/description/?envType=daily-question&envId=2025-09-10
#daily
Today quite interesting problem, I liked it, it is legit mid.
https://leetcode.com/problems/minimum-number-of-people-to-teach/description/?envType=daily-question&envId=2025-09-10
#daily
Daily
Today mid feels like easy. Solved in 2 mins, go and collect your coin.
https://leetcode.com/problems/sort-vowels-in-a-string/description/?envType=daily-question&envId=2025-09-11
#daily
Today mid feels like easy. Solved in 2 mins, go and collect your coin.
https://leetcode.com/problems/sort-vowels-in-a-string/description/?envType=daily-question&envId=2025-09-11
#daily
This media is not supported in your browser
VIEW IN TELEGRAM
Ahahhahah so accurate.
This is my CZ skill after 3.5 years here
This is my CZ skill after 3.5 years here
😁4