I'm trying to learn DP and every time I come across a daily problem with DP I watch your videos. I just want to say I appreciate you showing us the top down approach instead of going straight into using tabulation. It's more effort but it is appreciated.
Neato! I like your recursion to DP approach a lot. I got stuck at the DP solution when I tried to do it myself. But your video helps me understand how to develop the right way of thinking. Thank you!
Since we have a symmetric matrix we can optimize the final approach even more by operating on just top right and bottom left triangle matrix alternatively. This will reduce the memory by half but will take longer to write.
Can you please post video solutions of weekly contests it will be really helpful to understand those problems which we aren't able to solve .By seeing your videos we can easly upsolve the problem using initial hints during first half of the video
In the memoization approach(1st approach), can anyone tell me how to print the path of individual robots as well along with returning the results? Thanks.
We dont need to ever consider the case where c1 and c2 are the same, because it will never lead to the maximal result. I gave a short summary of why, it's basically a proof by contradiction.
I was wondering the same. But then i remembered he said in the beginning, the case where both robots land on zhe same grid will not be part of the best solution. So if it happens we just give up and return 0
This is a certified Neetcode classic. thanks for continuing my streak 💯
I'm trying to learn DP and every time I come across a daily problem with DP I watch your videos. I just want to say I appreciate you showing us the top down approach instead of going straight into using tabulation. It's more effort but it is appreciated.
Amazon intern interview thursday pray for me mr neetcode please
You got this!!! 💪
Neato! I like your recursion to DP approach a lot. I got stuck at the DP solution when I tried to do it myself. But your video helps me understand how to develop the right way of thinking. Thank you!
Since we have a symmetric matrix we can optimize the final approach even more by operating on just top right and bottom left triangle matrix alternatively. This will reduce the memory by half but will take longer to write.
neato btw, the hint leetcode gave scared me. also i can see why you consider this problem to be easier than cherry pickup 1, looks like a nightmare
Gave up trying to understand the code for the second approach lol. Will return with a fresher mind.
me seeing Neetcode's recursive solutions: "I can pretty much do it alone!"
me seeing Neetcode's tabulation solution: "Forget it, I can't"
What a difficult problem. Thank you!
The memo approach fails with TLE in Java on the last test case, so I have to do DP and it's Sunday 😪
Thank you so much, couldn't do it without you.
Nope it passes
@@SAIGOVINDSATISH yeah, I had a bug which caused my memo array to do nothing. Now it's alright :)
lost my sanity trying to get the dp solution
Can you please post video solutions of weekly contests it will be really helpful to understand those problems which we aren't able to solve .By seeing your videos we can easly upsolve the problem using initial hints during first half of the video
Thank you so much ❤❤❤
would it work to take the maximum cost route, remove it, then take the new maximum route again ? short answer : nope
Great explanation !! Thankyou :)
ah man , this was solvable , I just jumped to seeing the solution
In the memoization approach(1st approach), can anyone tell me how to print the path of individual robots as well along with returning the results? Thanks.
keeping a prev[][] matrix may help
Neetcode if you can here me, please save me. I have interview tmrw morning, please lend me ur strength
Thanks man :)
Why it should return 0 if c1 and c2 is same, instead of return maximum values from dfs(r+1, all possible column)
?
We dont need to ever consider the case where c1 and c2 are the same, because it will never lead to the maximal result. I gave a short summary of why, it's basically a proof by contradiction.
Thank you neato
this was the first hard i solved
Leetcode 2267 Would be interesting to solve. Please please please
Why it should return 0 if c1 and c2 is same, instead of return arr[r][c1] + 0 + maximum values from dfs(r+1, all possible column)
?
I was wondering the same. But then i remembered he said in the beginning, the case where both robots land on zhe same grid will not be part of the best solution. So if it happens we just give up and return 0
neat
I got this in first submission lol