File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/main/kotlin/g3601_3700
s3663_find_the_least_frequent_digit
s3666_minimum_operations_to_equalize_binary_string Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Solution {
10
10
val k = s.length
11
11
val freq: MutableMap <Int , Int > = HashMap <Int , Int >()
12
12
for (i in 0 .. < k) {
13
- val digit = s.get(i) .code - ' 0' .code
13
+ val digit = s[i] .code - ' 0' .code
14
14
freq.put(digit, freq.getOrDefault(digit, 0 ) + 1 )
15
15
}
16
16
var minfreq = Int .Companion .MAX_VALUE
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Solution {
23
23
bounds[zeros and 1 ][0 ] = bounds[zeros and 1 ][1 ]
24
24
bounds[1 - (zeros and 1 )][0 ] = Int .Companion .MAX_VALUE
25
25
bounds[1 - (zeros and 1 )][1 ] = Int .Companion .MIN_VALUE
26
- while (! q.isEmpty ()) {
26
+ while (q.isNotEmpty ()) {
27
27
// find min number of zeros and max number of zeros in this round
28
28
var minv = Int .Companion .MAX_VALUE
29
29
var maxv = Int .Companion .MIN_VALUE
You can’t perform that action at this time.
0 commit comments