Fewest Jumps to the End — Solution & Editorial
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)
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)