Stepping Stones (Arrays & Lists)

You stand on the first stone. The number on each stone is the longest jump you can make from it (any shorter jump is fine too). Print true if you can reach the last stone, else false.

Input: n (1 to 300), then n integers from 0 to 6.

Output: true or false.

Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • Track the farthest stone you can reach so far.

More Arrays & Lists practice