A robot walks a grid and turns counterclockwise whenever a wall blocks it. Support moving it and asking for its position and direction, every operation in constant time.
A robot walks a grid and turns counterclockwise whenever a wall blocks it. Support moving it and asking for its position and direction, every operation in constant time.
Opens with the full question.