Skip to content

Commit 7127527

Browse files
committed
Fixed sonar
1 parent 7d0f31c commit 7127527

File tree

2 files changed

+2
-2
lines changed
  • src/main/kotlin/g3301_3400
    • s3341_find_minimum_time_to_reach_last_room_i
    • s3342_find_minimum_time_to_reach_last_room_ii

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Solution {
2121
minHeap.offer(intArrayOf(0, 0, 0))
2222
time[0][0] = 0
2323
val directions = arrayOf<IntArray>(intArrayOf(1, 0), intArrayOf(-1, 0), intArrayOf(0, 1), intArrayOf(0, -1))
24-
while (!minHeap.isEmpty()) {
24+
while (minHeap.isNotEmpty()) {
2525
val current = minHeap.poll()
2626
val currentTime = current[0]
2727
val x = current[1]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Solution {
2929
node.turn = 0
3030
pq.add(node)
3131
moveTime[0][0] = -1
32-
while (!pq.isEmpty()) {
32+
while (pq.isNotEmpty()) {
3333
val curr = pq.poll()
3434
for (i in 0..3) {
3535
val x = curr.x + dir[i]!![0]

0 commit comments

Comments
 (0)