Open Saloni6111 opened 19 hours ago
Description: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do this in-place.
Constraints: Use constant space if possible.
Example: Input: [[1,1,1],[1,0,1],[1,1,1]] Output: [[1,0,1],[0,0,0],[1,0,1]]
Description: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do this in-place.
Constraints: Use constant space if possible.
Example: Input: [[1,1,1],[1,0,1],[1,1,1]] Output: [[1,0,1],[0,0,0],[1,0,1]]