MediumArrays & Hashing
Set Matrix Zeroes
Set entire row/col to 0 if element is 0
Solution Approach
Use first row and column as markers
Complexity Analysis
Time Complexity
O(m*n)Space Complexity
O(1)Complexity
Time:O(m*n)
Space:O(1)
Asked at
GoogleMicrosoft