LIS (Longest increasing subsequence) solution: kzbin.info/www/bejne/mZu6n4pmncl5Z7s Highly recommend watching it if you're new to difficult DP problems.
@irfansari_ Жыл бұрын
I appreciate the fact that you uploaded LeetCode daily problem and JS 3th day problem solutions Love u man
@kunalkheeva Жыл бұрын
dude I did not even know what is going on in the problem statement let alone the solution, appreciate you!
@JeffreyConcerto Жыл бұрын
For those not using Python and implementing their own binary search, you need to implement a right bisection, which returns the right-most index to insert the given element while maintaining the sorted order. Doing a normal binary search will give you the incorrect answer.
@DivineVision201 Жыл бұрын
Thanks Neetcode. I also understood that it is a LIS problem after reading and examining the question for 15 mins. I would like to thank you for clearing the concept in a beautiful way and also i got to know about bisect method to get the smallest index to place an element.. Also thanks for your amazing video contents.
@trishulcurtis1810 Жыл бұрын
There's no need to assign +1 for the dp list. We are not storing any extra values apart from the original obstacle list
@NeetCodeIO Жыл бұрын
I believe we may access index = length, which results in out of bounds, at least the way my binary search (bisect) is working, I believe.
@il5083 Жыл бұрын
Tried to use segment tree and got TLE, I suppose it's roughly the same time complexity. Nice opportunity to practice, though.
@iulianantoci7652 Жыл бұрын
Hey NeetCode, you are really amazing and your videos help me to stay in touch daily. But the part when you said that you are sleep deprived is not the beat man. I know that it is hard to deal with everything especially when you have 2 channels and a job but sometimes you can take a rest. Take care.
@АРТЕМИЙДАДЫКОВ Жыл бұрын
Thank you for your work!!! You are really cool !!! 😎 Hello from Russia! :)
@raushanraj_99 Жыл бұрын
Cruel person give it on day 6 😂😂
@msitrz Жыл бұрын
Hi NeetCode what is the hardest leet code problem you did a video on? Or the hardest you couldn’t solve. Just curious
@sharathkumar8338 Жыл бұрын
Hello Neetcode. So your recommendation is not directly look at the solution right?? because earlier I used to directly look at the solution and understand. First for 45 to 60 minutes we have to try it on our own and then we have to look at the solution. And after a while we'll have to revisit the same problem. Correct??
@NeetCodeIO Жыл бұрын
Yeah, if you end up looking at solution, I would come back to the problem after some period of time, and try to solve it from scratch (without solution)
@sharathkumar8338 Жыл бұрын
@@NeetCodeIO Thank you neetcode. I realised that quality is way more important than quantity. I used to go after quantity.
@krateskim4169 Жыл бұрын
Thank you so much
@rishabhmalhotra6474 Жыл бұрын
I really do not like this I was trying to maintain a good streak with easy medium problems and then they give this monster I think they should consider increasing level in some sort of sequential way rather than random so that ppl trying to keep the streak can also learn and gain knowledge with the same.
@prakashmohaldar9004 Жыл бұрын
Heyy tell me what if we need to print all those maxm length obstacle course subsequences, then how would we do it?
@AmanChauhan-hr1wh Жыл бұрын
If we update dp[inx]=n then about the prev value at that index we will lost it??