Try all possible jump paths with recursion or BFS.
With positions and max jump , the number of paths can be exponential.
Memoization helps but adds space. Can you do better?
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
The trap
Try all possible jump paths with recursion or BFS.
With positions and max jump , the number of paths can be exponential.
Memoization helps but adds space. Can you do better?