Jump Game II | Live Coding with Explanation | Leetcode - 45

preview_player
Показать описание
Detailed Explanation for Jump game 2 Leetcode Problem.
All parts solved. check it out.

To support us you can donate

Check out our other popular playlists:
Questions you might like:

If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.

#coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode
Рекомендации по теме
Комментарии
Автор

We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!

Questions you might like:

Struggling in a question??

Leave in a comment and we will make a video!!!🙂🙂🙂

AlgorithmsMadeEasy
Автор

This video was really helpful to understand both dp and greedy approach for this problem !!

shreyasingh
Автор

can anyone tell me what is the use of i+nums[i] in j<=min(n-1, i+nums[i]), why are we checking this condition?

pranjalbansal
Автор

What is the use of begin in the code ??

memesofengineer
Автор

Last Solution Perfect. For this simple approach i used memoization. Thanks for this good one

i.vigneshdavid
Автор

lit explanation. You deserve much buddy

hymnish_you
Автор

Oh god, greedy approach was so awesome. How you come to it?

hymnish_you
Автор

Great explanation but still couldn't get it!!!

techmoon_
Автор

Second approach will only work with the assumption that there always exist a path to last index, which is also specified in the question itself.
Am I correct?

uditagrawal
Автор

have a doubt how can we handle if we have a zero value ? example [1, 2, 0, 3, 5] now in step one we got to reach 5 from 5 we need 0 steps and from 3 to 5 we need only 1 now what to do if we have 0 ( i mean we can't reach anywhere from here so what to fill in our jump carrier array?)

please reply asap 🙂 Thank you .

vinodkrishnan
Автор

I suppose, the last if condition in the first solution is to make sure we increase only when we can really reach or exceed the end. Right?

rahulbawa
Автор

You actually did not use the begin variable but really great explanation guys

johnademola
Автор

I am so confused. Why are we adding index values? Can someone explain?

bolt
Автор

Good one guys. Your content is really awesome, simple, and easy to understand for interview preparation. Wish to see more things coming up on your channel like System Design etc.

pradiptalekar
Автор

you haven't used the "begin" variable, hopefully, you can replace the i variable with "begin".

ranjithsubramaniam
Автор

2:59 how jump from 3 to 4 is 1 ?? we have two elements in between right it should be 3 na??

pravin
Автор

Explanation for greedy approach is not clear!

rhythmbhatia
Автор

everything is good, but you didn't use begin pointer in the end though you declared it. Good efforts appreciated !

saiyashwanth