Skip to content

Commit 702293a

Browse files
committed
Fixed sonar warnings.
1 parent eb22204 commit 702293a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/main/kotlin/g0001_0100/s0010_regular_expression_matching/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Solution {
66
dp[text.length][pattern.length] = true
77
for (i in text.length downTo 0) {
88
for (j in pattern.length - 1 downTo 0) {
9-
val firstMatch = ((i < text.length && ((pattern[j] == text[i] || pattern[j] == '.'))))
9+
val firstMatch = i < text.length && ((pattern[j] == text[i] || pattern[j] == '.'))
1010
if (j + 1 < pattern.length && pattern[j + 1] == '*') {
1111
dp[i][j] = dp[i][j + 2] || firstMatch && dp[i + 1][j]
1212
} else {

src/main/kotlin/g0001_0100/s0012_integer_to_roman/Solution.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ class Solution {
5252
sb.append(cOne)
5353
}
5454
1 -> sb.append(cOne)
55-
else -> {
56-
}
5755
}
5856
return num - div * one
5957
}

0 commit comments

Comments
 (0)