Gamified challenge · Asked in Accenture
Your rocket 🚀 is lost in a maze and needs to get home to Earth 🌍. The maze is a list of rows: # is a wall, . is open space, S is the rocket and E is Earth.
Write escape(maze) that returns the rocket's moves as a string of U, D, L and R. Any route that lands on Earth without touching a wall passes; the shortest one earns a star.
Accenture's round games are free with an account: write your answer in Java or Python, watch it play out, and step through the algorithm.
Sign in with Google