Zero Matrix Transformation
ARRAY
MATRIX

Problem

Given an m x n integer matrix, modify the matrix such that if any element is zero, its entire row and column are set to zeros.

Examples

zeroMatrix([1, 0, 1], [1, 1, 1], [1, 0, 1]) // return [[0, 0, 0], [1, 0, 1], [0, 0, 0]]
Loading...
Loading...
Loading...