01 Matrix
Try to solve the 01 Matrix problem.
We'll cover the following
Statement
Given an mat
, find the distance from each cell to the nearest
Constraints:
mat.row
,mat.col
mat.row * mat.col
mat[i][j]
There is at least one
in mat
.
Example
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy