Skip to content

Commit 8e1bac5

Browse files
committed
Fixed sonar warning.
1 parent 702293a commit 8e1bac5

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/g0001_0100/s0010_regular_expression_matching

1 file changed

+1
-1
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 {

0 commit comments

Comments
 (0)