← Questions

Blind maze escape: one command sequence for every start

0
GoogleCodingLast asked Apr 2026

A robot is somewhere in a grid maze of walls (#), open cells (.) and an exit (E), but you do not know which open cell it starts on. It obeys the commands U, D, L and R, each moving it at most one cell. Find the shortest sequence of commands that brings the robot to the exit whatever cell it started from.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding