Set Matrix Zeros
Try to solve the Set Matrix Zeros problem.
We'll cover the following
Statement
Given a matrix, mat
, if any element within the matrix is zero, set that row and column to zero.
Constraints:
-
mat.row
,mat.col
-
mat[i][j]
Examples
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy