Search⌘ K
AI Features

Number of Spaces Cleaning Robot Cleaned

Understand how to simulate a cleaning robot navigating in a 2D binary matrix by moving, turning, and tracking visited spaces. Learn to implement efficient matrix traversal and direction-changing logic to count unique cleaned spaces repeatedly visited under specific conditions.

Statement

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