This video explains a very important programming interview problem which is to find if it is possible to jump indices of an array and reach the last index of array or not. We have some given constraints which are, we can’t jump from 0 valued index and that we always start at index 0. I have shown the solution using backtracking intuition and a very beautiful observation using valley peak approach. I have taken easily comprehend-able examples and finally explained the code for the same. As usual, CODE LINK is given in the description below. If you find any difficulty or have any query then do COMMENT below. This problem is from Day 25 of the leetcode 30 days April coding challenge. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful…CYA 🙂

CODE LINK:

Nguồn: https://mcitmc.org

Xem thêm bài viết khác: https://mcitmc.org/game/

### Xem thêm Bài Viết:

- Hướng dẫn chi tiết cách cài đặt Arma 3 full crack dành cho tân binh
- Hướng dẫn tải Shadow Fight 2 Appvn hack một cách chi tiết và đơn giản
- Hướng dẫn chi tiết cách sử dụng hack Cheat Engine 6.3 đơn giản nhất
- Hướng dẫn cài đặt Assassin’s Creed 1 full Crack cực kỳ đơn giản
- Hướng dẫn hack Subway Surfers nhanh trong một nốt nhạc

I like your voice and the way you explain it very plainly man.. No drama, just the logic and code.. Thank you!

Thanks sir. Great explanation.

You are an amazing teacher sir! Your all the explanations are beautiful and clears every concept! Words cannot describe your hard work!

We dont have to loop through the entire array in some cases . like [1,3,2,0,2] … in this we can reach end at 2nd index itself , we can have a check like — if (reachabe == n ) retrun true . save some time maybe

have u already made the DP approach for this?

I will try to do per exercise and watch your tube for finding a wiser solution. Hopefully, my answer will be as same as with you 😀

Sir please make video on min jumps using DP

public boolean canJump(int[] nums) {

int remainingSteps = Integer.MIN_VALUE;

for(int i=0;i<nums.length-1;i++) {

if(remainingSteps == Integer.MIN_VALUE) {

remainingSteps = nums[i];

} else {

remainingSteps = Math.max((remainingSteps-1) , (nums[i]));

}

if(remainingSteps <= 0) {

return false;

}

}

return true;

}

Great Explanation!!!

Check out the code here:https://github.com/RajeshAatrayan/InterviewPreparation/blob/master/src/DynamicProgramming/Minimumnumberofjumps.java

Dude, I made the mistake to look for a solution for this from other videos. But i must say i could only understand it by your explanation. Keep up the good work buddy.

broo You inspire me to code…..

sir, u r really the best.. thank u so muchhhh..

Dude… just an awesome explanation.

we can also start from ending index of the array and keep updating the required jumps(starting from 1), and finally check for the first element if it has the required number of jumps !!

that's the best video on this topic ,sir plz upload some dynamic programming video

I liked this solution

I wish I have your brain man, I wasn't able to think this kind of solution… you earn a new subscriber

I could not appreciate you more for your initiative of making video each day. BIG THANKS.

My coding skills improved a lot sir because of you❤

After this series plz make video on how to crack codevita exam

Bro,Kindly explain jump game 2 in leetcode

super explanation!!!

Few more subscribers away from 10k!

Congratulations in advance!🤘🙌

This is just the beginning 💪😎

I just love the way you explain, even a novice programmer can understand the concept. Keep going.

Great explanation. I solved the same question today. I have linked your video in my description.