Number of Spaces Cleaning Robot Cleaned
Explore how to simulate a cleaning robot moving through a 2D binary matrix, cleaning unique spaces by moving forward and turning on obstacles. This lesson helps you understand matrix traversal, direction changes, and conditions to count cleaned spaces efficiently.
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