Minimum Distance to Nearest Locker

Asked at Amazon · Coding Questions · Difficulty: Medium

In an `m x n` grid, `lockers` gives coordinates of lockers. Return a 2D array where each cell holds the Manhattan (4-directional) distance to the nearest locker.

Loading the problem…