2203. Number of Spaces Cleaning Robot Cleaned

Medium
Array
Matrix
Simulation

Description

Hints

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.

Similar Questions

Statistics

Acceptance
62.4%
Submissions
17,183
Accepted
10,719