You explain the thought process so understandably and in great detail that I don't even feel dumb anymore.
bundiderp
thanks neetcode, the question candy was asked in my interview...I saw ur video 😅 before the interview❤❤❤
criconicsbyme
thank you very much, this daily tasks are going harder and harder, needs new type of algorithms for me, union find, difikstra. I am glad to have you and you brilliant solutions with explanations. thank you
damirsharip
I solved this question myself, but I overcomplicated it, I built an adj list and traversed nodes using dijkstra's algorithm, but anyway, I proud I solved it myself, and huge part of this is you neetcode, thanks!
YT.Nikolay
How come you could solve it in such a brilliant way.
My first idea was to somehow use DFS. I wanted to go trough all possible routes and calculate the diff for them. And than return the min value. I wanted to do it with O (N ^ Infinity) time complexity, but This is amazing....
kirillzlobin
Could you please help me understand why we should use Djikstra algorithm here? I understand that we can use it here but how much faster will it be compared to the regular DFS with memoization storing the cost to reach (row - 1, col - 1) element?
dankiy
is line 12 needed, if we are already checking if the newR and newC are in visit? (lines 21)
jsdev
try to add these code and notes link in the discription please, would be very helpful
harmaina
Brilliant explanation as always = thank you so much and please continue🥰
sallaklamhayyen
how this comes to find min path we are trying to find max in every time?
alissabrave
instead of checking if the new row and new col is < 0 or == len(row)/len(row[0]) like you did in lines 20/21 you can just check if next_row in range(len(heights)) and next_col in range(len(heights[0])). Less text!
Raymond-Wu
Great video but I think the original and "corrected" time complexity is wrong. Can you explain how you came up with the "corrected" time complexity if you think it is correct?
schan
understood in one go excellent explaination, could you please solve leetcode 827 making large islands
prajjwaldubey
Thanks for amazing explanation. Do we need to check visit condition on line 22 as it’s checked on line 12 when popping?
StellasAdi
Can you please explain why a simple DFS method (without binary search) would not work to solve this problem? To me - all it seems to care about is the minimum absolute difference to get from 0, 0 to the bottom right corner cell. Would you say it is impossible to use a DFS method to solve this problem? If so - please elaborate on why.
SmoothCode
can you please explain the problem 403. Frog Jump . I'm stuck on it. I know how to start but somehow I get stuck and not able to reach the solution.
jesmigeorge
This looks very similar to the Prims algo, is it the same or is it different?
rohanchess
so bfs with a priority Q instead of normal Q?
gradientO
I hope we all recognise that this is too genius of a solution