Solution: Set Matrix Zeroes

Let's solve the Set Matrix Zeroes problem using the Matrix Transformations pattern.

Statement

Given a matrix, mat, if any element within the matrix is zero, set that row and column to zero.

Constraints:

  • 11 \le mat.row, mat.col 20\le 20
...

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.