Challenge for Problem Spaces and How to Traverse Them

Challenge

A 1d maze is an array of numbers. In each cell, the number represents the number of steps you can jump towards right or left (within the limits of the maze). The player starts from the left most block. The goal is to reach the cell with the number 0.

Write a program that finds the shortest path from the left-most cell of a 1d maze, to its 0 valued block.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us
Sign in or email us at [email protected]