Fill each empty room with the distance to its nearest gate. Walls are -1, gates are 0, empty rooms are INF.
You are given a 2D grid where:
Fill each empty room (INF) with the distance to its nearest gate. If a room cannot reach a gate, leave it as INF.