Amazon Robotics Interview Question

How to traverse a 2d array maze