11.07 · Problem
Walls and Gates
This problem is part of solulu Pro
A grid of rooms holds -1 (wall), 0 (gate) or 2147483647 (an empty room, call it INF). Fill each empty room in place with the distance (in 4-directional steps) to its nearest gate. Rooms that can't reach any gate stay…
Lifetime ₹1,999 ₹999 · Launch offer
Item 86 of 150 · updated 2026-10-12