Search
⌘K

Leetcode 542. 01 Matrix

For each cell in a binary m×n grid, compute the minimum number of orthogonal steps to reach the nearest 0; the core challenge is efficiently computing these shortest distances for all cells (typically via multi-source BFS from all zeros or a two-pass DP).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.