Tag: setmatrixzeroes
-
Data Structures & Algorithms in Java – Matrix – Set Matrix Zeroes
Problem: Given a matrix , if any of its element is zero , make all the elements in both the row and column of the element to zero. For example: For the given matrix: [[1,1,1],[1,0,1],[1,1,1]] The second row second column has the value zero. So make all the values in the second row and second…