Medium · Dynamic programming

Jump Game

You are given a list of whole numbers. You start on the first, and each number is the furthest you may jump forward from there. Return whether you can reach the last position.

  • Numbers are zero or more.
  • You may jump any distance up to the number, not only exactly it.
  • A list of one is already at the end.
nums = [2, 3, 1, 1, 4]

→ true   (1 step, then 3)
Record your take

No one has solved it yet.