Skip to content

Commit 607cf94

Browse files
committed
Fixed sonar
1 parent 25c34ce commit 607cf94

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/s3690_split_and_merge_array_transformation/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Solution {
3232
que.add(source)
3333
val distances = IntArray(6.0.pow(n.toDouble()).toInt())
3434
distances[source] = 1
35-
while (!que.isEmpty()) {
35+
while (que.isNotEmpty()) {
3636
val x: Int = que.poll()!!
3737
val cur = rev(x, n)
3838
for (i in 0..<n) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Solution {
5656
pq.add(longArrayOf(st.getMax(i, n - 1) - st.getMin(i, n - 1), i.toLong(), (n - 1).toLong()))
5757
}
5858
var ans: Long = 0
59-
while (k-- > 0 && !pq.isEmpty()) {
59+
while (k-- > 0 && pq.isNotEmpty()) {
6060
val cur = pq.poll()
6161
ans += cur[0]
6262
val l = cur[1].toInt()

0 commit comments

Comments
 (0)