Why the expected output for [,] is [,]. I think the output should be [,] because the first element '0' makes items in first column are set to be 0.
by my view, any matrix which contains at least one 0 will be transformed to the matrix that contains only 0.
Only the original zeroes are ones which trigger the row and column to switch. The ones which are created by the original ones do not get counted towards the change, so having one zero will not change the entire matrix.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.