Skip to content

Commit

Permalink
Fixed sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
javadev committed Dec 22, 2024
1 parent d845317 commit b85cfd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Arrays;

public class Solution {
private final int mod = (int) (1e9 + 7);
private static final int MOD = (int) (1e9 + 7);
private int m = -1;
private int n = -1;
private int[][][] dp;
Expand Down Expand Up @@ -35,7 +35,7 @@ private int dfs(int[][] grid, int xorVal, int k, int i, int j) {
}
int down = dfs(grid, xorVal, k, i + 1, j);
int right = dfs(grid, xorVal, k, i, j + 1);
dp[i][j][xorVal] = (down + right) % mod;
dp[i][j][xorVal] = (down + right) % MOD;
return dp[i][j][xorVal];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.util.Arrays;

@SuppressWarnings("unused")
public class Solution {
public boolean checkValidCuts(int n, int[][] rectangles) {
int m = rectangles.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public int subsequencesWithMiddleMode(int[] a) {
if (!midEntry.getKey().equals(tmpEntry.getKey())) {
List<Integer> c = tmpEntry.getValue();
int size = c.size();
for (int k = 0, j = 0; k < m; k++) {
int k = 0;
int j = 0;
while (k < m) {
int i = b.get(k);
int r = m - 1 - k;
int u = i - k;
Expand Down Expand Up @@ -114,6 +116,7 @@ public int subsequencesWithMiddleMode(int[] a) {
dif =
(dif + convert(r, 1) * convert(x, 2) % MOD * convert(y, 1) % MOD)
% MOD;
k++;
}
}
}
Expand Down

0 comments on commit b85cfd7

Please sign in to comment.