andreyka26_se
Daily (152 day streak) Nice dynamic programming problem. Not that hard tbh https://leetcode.com/problems/max-dot-product-of-two-subsequences/description/?envType=daily-question&envId=2026-01-08 #daily #hard
tbh, I would rate it as medium, very default, very straight forward if you know dp, and easy to build an intuition for that
β€3
This media is not supported in your browser
VIEW IN TELEGRAM
Was on apartment viewing, and I guess I found a boss in this neighbourhood
π6
Daily (153 day streak)
Amazing daily again, from one of the lists, so probably you have it solved (I had). But good to remind.
https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/description/?envType=daily-question&envId=2026-01-09
#daily #medium
Amazing daily again, from one of the lists, so probably you have it solved (I had). But good to remind.
https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/description/?envType=daily-question&envId=2026-01-09
#daily #medium
π3
So you can understand. At One of the viewings (apartment), there were 15 people at the same time. 3 chunks sequentially for review. 3 out of 6 guys along with me were ready to submit all documents right away at the place and sign everything.
I have talked to one guy - he told that he is searching for apartment for him and his wife for 3 months already. Crazy
I have talked to one guy - he told that he is searching for apartment for him and his wife for 3 months already. Crazy
π€―5
andreyka26_se
So you can understand. At One of the viewings (apartment), there were 15 people at the same time. 3 chunks sequentially for review. 3 out of 6 guys along with me were ready to submit all documents right away at the place and sign everything. I have talkedβ¦
Yesterday for that reason I prepared the draft in gmail, with attached docs (they require fucking ton of docs, bank statements, payslips, curr and prev contracts, landlord ref, employer ref, surprised there is no dickpick point id), so that I ll be the top of the pile.
And today was a bit funny, when guy told, I am ready to send all docs and sign, which is your email? - I told the agent straight awayβalready sent, is this correct email?β (Showing screen)
ππ
And today was a bit funny, when guy told, I am ready to send all docs and sign, which is your email? - I told the agent straight awayβalready sent, is this correct email?β (Showing screen)
ππ
π₯7
Daily (154 day streak)
Good dp problem. Actually very similar to common subsequence.
https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/description/?envType=daily-question&envId=2026-01-10
#daily #medium
Good dp problem. Actually very similar to common subsequence.
https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/description/?envType=daily-question&envId=2026-01-10
#daily #medium
π2β€1
andreyka26_se
Daily (154 day streak) Good dp problem. Actually very similar to common subsequence. https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/description/?envType=daily-question&envId=2026-01-10 #daily #medium
So, for new people, I'm doing leetcode for a long time. And sometimes I'm pasting here useful templates / approaches for leetcode questions (as they are needed for interview).
Today given good 2dp problem we will see how to convert top-down to bottom up (without applying much thinking).
1. Come up with exponential recursion that has input and produces (stateless) output for it
2. Add memoization with @cache decorator
3. Apply array based cache (-1 element does not exist)
4. Slightly imagine the callstack of recursion, and reverse it with for loop.
4.1 Depending on your recursion, realize where input starts, where it ends. In our case we start from
4.2 Create these reversed for loops
4.3 Check base cases, and precalculate base cases before for loop
4.4 All remaining code is the same as in top down except (return ans). Change recursive calls to cache calls
5. You are welcome
Today given good 2dp problem we will see how to convert top-down to bottom up (without applying much thinking).
1. Come up with exponential recursion that has input and produces (stateless) output for it
2. Add memoization with @cache decorator
3. Apply array based cache (-1 element does not exist)
4. Slightly imagine the callstack of recursion, and reverse it with for loop.
4.1 Depending on your recursion, realize where input starts, where it ends. In our case we start from
0,0 and end at len(s1) or len(s2). So for bottom up we should reverse -> we start from len(s1) & len(s2) and go up from bottom to 0,0.4.2 Create these reversed for loops
4.3 Check base cases, and precalculate base cases before for loop
4.4 All remaining code is the same as in top down except (return ans). Change recursive calls to cache calls
5. You are welcome
π4
For today's daily, people suggest to solve this question:
https://leetcode.com/problems/largest-rectangle-in-histogram/
it should be actually good, but I'm a bit struggling to finish it. So seems like tomorrow's daily is going to be pretty hard.
There is also a note that max area rectangle is solved COMPLETELY different way than max area square.
https://leetcode.com/problems/largest-rectangle-in-histogram/
it should be actually good, but I'm a bit struggling to finish it. So seems like tomorrow's daily is going to be pretty hard.
There is also a note that max area rectangle is solved COMPLETELY different way than max area square.
LeetCode
Largest Rectangle in Histogram - LeetCode
Can you solve this real interview question? Largest Rectangle in Histogram - Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
Exampleβ¦
Exampleβ¦
π3
Daily (155 day streak).
Well, today is pretty hard question. As I mentioned above, better to solve the question before that, which will be used as subsolution to today's daily.
I'm just happy it is Sunday and I was not in a rush
https://leetcode.com/problems/maximal-rectangle/description/?envType=daily-question&envId=2026-01-11
#daily #hard
Well, today is pretty hard question. As I mentioned above, better to solve the question before that, which will be used as subsolution to today's daily.
I'm just happy it is Sunday and I was not in a rush
https://leetcode.com/problems/maximal-rectangle/description/?envType=daily-question&envId=2026-01-11
#daily #hard
π₯2
Daily (156 day streak)
Happy Monday. Easy problem, after yesterday's problem feels fckng amazing.
https://leetcode.com/problems/minimum-time-visiting-all-points/description/?envType=daily-question&envId=2026-01-12
#daily #easy
Happy Monday. Easy problem, after yesterday's problem feels fckng amazing.
https://leetcode.com/problems/minimum-time-visiting-all-points/description/?envType=daily-question&envId=2026-01-12
#daily #easy
π5π₯1
Daily (157 day streak)
Today is pretty interesting problem. Binary search on real numbers. I would not say it is very easy, and it uses some sort of "unique" technique that you never seen before.
https://leetcode.com/problems/separate-squares-i/solutions/6426084/binary-search-by-fahad_mubeen-k83n/?envType=daily-question&envId=2026-01-13
#daily #medium
Today is pretty interesting problem. Binary search on real numbers. I would not say it is very easy, and it uses some sort of "unique" technique that you never seen before.
https://leetcode.com/problems/separate-squares-i/solutions/6426084/binary-search-by-fahad_mubeen-k83n/?envType=daily-question&envId=2026-01-13
#daily #medium
π9
https://leetcode.com/problems/rectangle-area-ii/description/
I'll be honest with you I don't give a shit about how to solve it, because of above.
I mean segment tree on it's own is already hard enough thing. Now we should put it, add sweep line and hell knows what else.
Instead of this I would do some hard task from top 100 liked questions, sorry, go unsubscribe if I disappointed somebody
I'll be honest with you I don't give a shit about how to solve it, because of above.
I mean segment tree on it's own is already hard enough thing. Now we should put it, add sweep line and hell knows what else.
Instead of this I would do some hard task from top 100 liked questions, sorry, go unsubscribe if I disappointed somebody
π10
Punishment problem (for not solving daily)
From top 100 liked questions. I would not say to be honest that it is hard. I would rate as mid.
https://leetcode.com/problems/minimum-window-substring/description/?envType=study-plan-v2&envId=top-100-liked
#punishment #hard
From top 100 liked questions. I would not say to be honest that it is hard. I would rate as mid.
https://leetcode.com/problems/minimum-window-substring/description/?envType=study-plan-v2&envId=top-100-liked
#punishment #hard
π4