Robot Vacuum 8-Direction Grid

Asked at Pinterest · Coding Questions · Difficulty: Medium · Last asked Jan 12, 2026

Three-part robot-traversal grid problem: a vacuum starts at a position and can move in 8 directions (orthogonal + diagonal). Return all reachable cells in three settings — open grid, single-obstacle grid, and two cooperating vacuums.

Loading the problem…