Number of Spaces Cleaning Robot Cleaned
Explore how to simulate a cleaning robot moving through a 2D binary matrix that represents a room with obstacles. Learn to apply matrix traversal techniques to track the robot’s path, identify when it revisits a space facing the same direction, and calculate the total unique spaces cleaned. This lesson develops problem-solving skills related to matrices and traversal logic.
We'll cover the following...
We'll cover the following...
Statement
You are given a 0-indexed 2D binary matrix, room, representing a room of size