Number of Spaces Cleaning Robot Cleaned
Explore how to simulate a cleaning robot moving in a 2D matrix, turning upon encountering objects or edges, and determine the number of unique spaces it cleans before repeating a move. This lesson helps you master matrix traversal techniques and direction handling to solve such spatial problems in coding interviews.
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