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 bd55005 commit bf5bddeCopy full SHA for bf5bdde
src/main/java/com/fishercoder/solutions/_1198.java
@@ -20,9 +20,8 @@ public static class Solution1 {
20
public int smallestCommonElement(int[][] mat) {
21
int m = mat.length;
22
int n = mat[0].length;
23
- int minCommon;
24
for (int j = 0; j < n; j++) {
25
- minCommon = mat[0][j];
+ int minCommon = mat[0][j];
26
int i = 1;
27
for (; i < m; i++) {//we'll start from the second row
28
if (thisRowHasThisNumber(mat[i], minCommon)) {
0 commit comments