LeetCode 55 Jump Game - Why Naive Fails

The trap

Try all possible jump paths with recursion or BFS.

With nn positions and max jump kk, the number of paths can be exponential.

Memoization helps but adds O(n)O(n) space. Can you do better?