isColumn/RowOnlyFalse

This commit is contained in:
2023-05-10 20:22:20 +02:00
parent e7c7065a8d
commit 8ec5a622d8
2 changed files with 40 additions and 0 deletions

View File

@ -36,4 +36,22 @@ public class Array{
}
return newMatrix;
}
public static boolean isRowOnlyFalse(boolean[][] o, int row){
boolean mark = true;
for (int i = 0; i < o[row].length; i++) {
if(o[row][i])
mark = false;
}
return mark;
}
public static boolean isColumnOnlyFalse(boolean[][] o, int column){
boolean mark = true;
for (int i = 0; i < o.length; i++) {
if(o[i][column])
mark = false;
}
return mark;
}
}