Search⌘ K
AI Features

Number of Spaces Cleaning Robot Cleaned

Explore how a cleaning robot navigates a 2D binary matrix by moving straight, turning clockwise upon obstacles, and cleaning unique spaces. Learn to implement an algorithm that tracks the robot's path and counts cleaned spaces until a repeated position and direction occurs.

Statement

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