Problems > Fewest Jumps to the End > Editorial

Fewest Jumps to the End — Solution & Editorial

Back to the Problem

BFS-layer greedy: track the current layer's right edge and the furthest reach seen; when the sweep passes the layer edge, one more jump starts a new layer.

Complexity: O(N)