Provide an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0
Problem Provide an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0
Example **Input : **
1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 Output :
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 Solution Method 1 - Using the extra space and O(n^2) solution
[Read More]