Medium — BFS | Matrix | Graph The Problem Fill each empty room with the distance to its nearest gate, where rooms are represented by a 2D grid with gates (0), walls (-1), and empty rooms (INF). Approach Use multi-source BFS starting from all gates si...
Markdown supported · ⌘↵ to post
No responses yet.