Given an m x n integer matrix, if an element is 0, set its entire row and column to 0 in-place.
Input: matrix = [[1,1,1],[1,0,1],[1,1,1]]
Output: [[1,0,1],[0,0,0],[1,0,1]]
Topics: arrays
Asked by: Microsoft, Amazon
Time complexity: O(m*n). Space complexity: O(1).