We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4107eab commit 262b9e3Copy full SHA for 262b9e3
src/main/java/com/fishercoder/solutions/_1198.java
@@ -22,8 +22,9 @@ public int smallestCommonElement(int[][] mat) {
22
int n = mat[0].length;
23
for (int j = 0; j < n; j++) {
24
int minCommon = mat[0][j];
25
+ //we'll start from the second row
26
int i = 1;
- for (; i < m; i++) {//we'll start from the second row
27
+ for (; i < m; i++) {
28
if (thisRowHasThisNumber(mat[i], minCommon)) {
29
continue;
30
} else {
0 commit comments