Pergunta de entrevista da empresa Microsoft

Robot in a maze, in which moment the robot is going into a loop.