← All problemsSign in

Jumping Bob

Bob's friend Alice has given him a non-empty array of positive integers, where each integer represents the maximum number of steps he can take forward. For example, if the element at index 3 is 2, Bob can go from index 3 to index 4 or 5. Now you need to help Bob find the minimum number of jumps needed to reach the final index of the array. Note that jumping from index i to i+x always constitute

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start