Skip to content

Commit 70f19c2

Browse files
committed
fixed sonar
1 parent 08e35ca commit 70f19c2

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/g3201_3300/s3297_count_substrings_that_can_be_rearranged_to_contain_a_string_i

1 file changed

+2
-2
lines changed

src/main/kotlin/g3201_3300/s3297_count_substrings_that_can_be_rearranged_to_contain_a_string_i/Solution.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Solution {
2020
var start = 0
2121
var end = 0
2222
while (end < len) {
23-
val index = word1.get(end).code - 'a'.code
23+
val index = word1[end].code - 'a'.code
2424
if (!letters[index]) {
2525
end++
2626
continue
@@ -30,7 +30,7 @@ class Solution {
3030
}
3131
while (keys == 0) {
3232
res += (len - end).toLong()
33-
val beginIndex = word1.get(start++).code - 'a'.code
33+
val beginIndex = word1[start++].code - 'a'.code
3434
if (!letters[beginIndex]) {
3535
continue
3636
}

0 commit comments

Comments
 (0)