Jump Game: Return the Actual Path
Extending Jump Game: besides deciding reachability, return an actual path of landing indices (including start 0 and end n-1). Jumping to the farthest cell may land on a 0 and get stuck, so the landing...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
