You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/g3201_3300/s3297_count_substrings_that_can_be_rearranged_to_contain_a_string_i/Solution.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ class Solution {
20
20
var start =0
21
21
var end =0
22
22
while (end < len) {
23
-
val index = word1.get(end).code -'a'.code
23
+
val index = word1[end].code -'a'.code
24
24
if (!letters[index]) {
25
25
end++
26
26
continue
@@ -30,7 +30,7 @@ class Solution {
30
30
}
31
31
while (keys ==0) {
32
32
res += (len - end).toLong()
33
-
val beginIndex = word1.get(start++).code -'a'.code
0 commit comments