Skip to content

Commit 8274c73

Browse files
committed
Fixed sonar
1 parent cc6e2bd commit 8274c73

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/g3401_3500/s3470_permutations_iv/Solution.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,9 @@ private long rec(int o, int e, int req) {
3838
count = addCapped(count, multiplyCapped(e, rec(o, e - 1, 0)));
3939
}
4040
} else if (req == 0) {
41-
if (o > 0) {
42-
count = multiplyCapped(o, rec(o - 1, e, 1));
43-
}
41+
if (o > 0) count = multiplyCapped(o, rec(o - 1, e, 1));
4442
} else {
45-
if (e > 0) {
46-
count = multiplyCapped(e, rec(o, e - 1, 0));
47-
}
43+
if (e > 0) count = multiplyCapped(e, rec(o, e - 1, 0));
4844
}
4945
dp[o][e][req] = count;
5046
return count;

0 commit comments

Comments
 (0)