educative.io

Adding we add a 1 to currentIndex

Why do we do start = currentIndex + 1?
One possible reason is to avoid a infinite recursion, but there are other ways to avoid infinite recursion
What is the logical explanation to add 1 to currentIndex? May be its a silly reason, I am overlooking


Course: Grokking Dynamic Programming Patterns for Coding Interviews - Learn Interactively
Lesson: Minimum jumps to reach the end - Grokking Dynamic Programming Patterns for Coding Interviews

As yes, we are counting jumps from 1 to p, as mentioned in the description


Course: Grokking Dynamic Programming Patterns for Coding Interviews - Learn Interactively
Lesson: Minimum jumps to reach the end - Grokking Dynamic Programming Patterns for Coding Interviews