Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
The array
Arcs = possible jumps; the mark under each cell says whether it can reach the end
Each nums[i] is the maximum jump length from index i. Starting at index 0, return true if you can reach the last index, otherwise false.
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
Arcs = possible jumps; the mark under each cell says whether it can reach the end
n = len(nums). The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. Integers from 0 to 99; drawings use at most 10 numbers for top-down DP, 12 for bottom-up DP and 14 for greedy.