Skip to content

Commit 6ebf2ee

Browse files
committed
Fixed sonar
1 parent e417203 commit 6ebf2ee

File tree

2 files changed

+2
-2
lines changed
  • src/main/kotlin/g3601_3700

2 files changed

+2
-2
lines changed

src/main/kotlin/g3601_3700/s3663_find_the_least_frequent_digit/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/main/kotlin/g3601_3700/s3666_minimum_operations_to_equalize_binary_string/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)