Search⌘ K
AI Features

Number of Spaces Cleaning Robot Cleaned

Explore how a cleaning robot moves through a 2D binary matrix, navigating obstacles and calculating all unique spaces it cleans. Understand the logic behind robot navigation and practice implementing matrix traversal algorithms to solve such problems.

Statement

You are given a 0-indexed 2D binary matrix, room, representing a room of size m×nm \times n. In this matrix, 00 represents an empty space, while ...