Given an array where each element represents your maximum jump length from that position, return the minimum number of jumps needed to reach the last index (a valid path is always guaranteed to exist).
Example 1
Explanation: Jump 1 step from index 0 to index 1, then 3 steps from index 1 to the last index — 2 jumps total.
Example 2
Explanation: Jump from index 0 to index 1 (within the first range), then from index 1 directly to index 4.
Example 3
Explanation: Every element only allows a single step, so reaching the last index takes exactly 3 one-step jumps.
Code execution is coming soon.