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 {
1010 val k = s.length
1111 val freq: MutableMap <Int , Int > = HashMap <Int , Int >()
1212 for (i in 0 .. < k) {
13- val digit = s.get(i) .code - ' 0' .code
13+ val digit = s[i] .code - ' 0' .code
1414 freq.put(digit, freq.getOrDefault(digit, 0 ) + 1 )
1515 }
1616 var minfreq = Int .Companion .MAX_VALUE
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Solution {
2323 bounds[zeros and 1 ][0 ] = bounds[zeros and 1 ][1 ]
2424 bounds[1 - (zeros and 1 )][0 ] = Int .Companion .MAX_VALUE
2525 bounds[1 - (zeros and 1 )][1 ] = Int .Companion .MIN_VALUE
26- while (! q.isEmpty ()) {
26+ while (q.isNotEmpty ()) {
2727 // find min number of zeros and max number of zeros in this round
2828 var minv = Int .Companion .MAX_VALUE
2929 var maxv = Int .Companion .MIN_VALUE
You can’t perform that action at this time.
0 commit comments