01 Matrix
CodingPhoneSoftware EngineerReported Jun, 2026High Frequency
Company question banks are included with the Insider plan.
Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
The distance between two adjacent cells is 1. Cells are adjacent in the four cardinal directions.