Skip to content

Commit 22005bb

Browse files
committed
Improved tags
1 parent bdffd2d commit 22005bb

File tree

2 files changed

+4
-4
lines changed
  • src/main/kotlin/g3301_3400
    • s3398_smallest_substring_with_identical_characters_i
    • s3399_smallest_substring_with_identical_characters_ii

2 files changed

+4
-4
lines changed

src/main/kotlin/g3301_3400/s3398_smallest_substring_with_identical_characters_i/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package g3301_3400.s3398_smallest_substring_with_identical_characters_i
22

3-
// #Hard #2024_12_24_Time_1_ms_(100.00%)_Space_42.9_MB_(39.83%)
3+
// #Hard #2024_12_24_Time_2_ms_(100.00%)_Space_36.4_MB_(92.86%)
44

55
class Solution {
66
fun minLength(s: String, ops: Int): Int {

src/main/kotlin/g3301_3400/s3399_smallest_substring_with_identical_characters_ii/Solution.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
package g3301_3400.s3399_smallest_substring_with_identical_characters_ii
22

3-
// #Hard #2024_12_24_Time_11_ms_(100.00%)_Space_45.7_MB_(54.55%)
3+
// #Hard #2024_12_24_Time_22_ms_(100.00%)_Space_40.7_MB_(100.00%)
44

55
class Solution {
66
fun minLength(s: String, numOps: Int): Int {
77
val l = s.length
88
var lingyi = 0
99
var yiling = 0
1010
val pq: MutableList<Int> = ArrayList<Int>()
11-
var thisone = s.get(0)
11+
var thisone = s[0]
1212
var chang = 1
1313
if (thisone == '0') {
1414
yiling++
1515
} else {
1616
lingyi++
1717
}
1818
for (i in 1..<l) {
19-
val cur = s.get(i)
19+
val cur = s[i]
2020
if (cur == thisone) {
2121
chang++
2222
} else {

0 commit comments

Comments
 (0)