Number of Spaces Cleaning Robot Cleaned
Understand how to simulate a robot cleaning path in a 2D binary matrix where empty spaces are cleaned as the robot moves. Learn to track its position and direction changes, identify repeated states, and calculate the total unique spaces cleaned by applying matrix traversal and direction logic. This lesson helps you develop problem-solving skills related to matrix manipulation and state tracking.
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