Walls and Gates — Graphs: BFS/DFS
Fill each open room on a floor map with its shortest walking distance to the nearest exit, leaving unreachable rooms unmeasured.
Graphs: BFS/DFS · Medium
Fill each open room on a floor map with its shortest walking distance to the nearest exit, leaving unreachable rooms unmeasured.
Graphs: BFS/DFS · Medium