< Previous
Next >
[Array]
[Matrix]
[Simulation]
Hint 1
Simulate how the robot moves and keep track of how many spaces it has cleaned so far.
Hint 2
When can we stop the simulation?
Hint 3
When the robot reaches a space that it has already cleaned and is facing the same direction as before, we can stop the simulation.