DIY: Walls and Gates
Understand how to solve the Walls and Gates challenge by programming a function that fills empty rooms with the shortest distance to gates on a grid, using Go. Explore grid traversal and distance mapping techniques needed for real-world coding interview success.
We'll cover the following...
We'll cover the following...
Problem
You are given a grid represented by a 2D array named rooms. The grid represents rooms where a cell can either be a wall, a gate, or an empty space. The rooms are initialized with these three possible values.
| Values | Represents |
|---|---|
| A wall or an obstacle | |