Why the output for [[0],[1]] is [[0],[1]]?

  • 2

    Why the expected output for [[0],[1]] is [[0],[1]]. I think the output should be [[0],[0]] because the first element '0' makes items in first column are set to be 0.

  • -4

    by my view, any matrix which contains at least one 0 will be transformed to the matrix that contains only 0.

  • 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.

  • 1

    Can you confirm that? My solution produces [[0],[0]] and gets AC.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.