Given a matrix of size n x m filled with 0\'s and 1\'s e.g.: 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 if the matrix has 1 a
Given a matrix of size n x m filled with 0\'s and 1\'s
e.g.:
1 1 0 1 0
0 0 0 0 0
0 1 0 0 0
1 0 1 1 0
if the matrix has 1 a
public void setOnes(int [][] matrix){ boolean [] row = new boolean [matrix.length] boolean [] col = new boolean [matrix[0].length] for (int i=0;i