Search⌘ K
AI Features

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.

Statement

You are given a 0-indexed 2D binary matrix, room, representing a room of size ...