9.Set Matrix Zeroes
Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place.
Solution I: (Using extra space)
Time Complexity: O(m * n), Space Complexity: O(m) , O(n)
Last updated
Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place.
Time Complexity: O(m * n), Space Complexity: O(m) , O(n)
Last updated