Skip to content

Commit 17230dc

Browse files
committed
Fixed sonar
1 parent a7995f9 commit 17230dc

File tree

1 file changed

+2
-3
lines changed
  • src/main/kotlin/g3501_3600/s3552_grid_teleportation_traversal

1 file changed

+2
-3
lines changed

src/main/kotlin/g3501_3600/s3552_grid_teleportation_traversal/Solution.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package g3501_3600.s3552_grid_teleportation_traversal
55
import java.util.LinkedList
66
import java.util.Queue
77

8+
@Suppress("kotlin:S107")
89
class Solution {
910
private fun initializePortals(m: Int, n: Int, matrix: Array<String>): Array<MutableList<IntArray>> {
1011
val portalsToPositions: Array<MutableList<IntArray>> = Array(26) { ArrayList() }
@@ -83,14 +84,12 @@ class Solution {
8384
) {
8485
return 0
8586
}
86-
8787
val portalsToPositions = initializePortals(m, n, matrix)
8888
val visited = Array<BooleanArray?>(m) { BooleanArray(n) }
8989
val queue: Queue<IntArray> = LinkedList()
9090
initializeQueue(queue, visited, matrix, portalsToPositions)
91-
9291
var moves = 0
93-
while (!queue.isEmpty()) {
92+
while (queue.isNotEmpty()) {
9493
var sz = queue.size
9594
while (sz-- > 0) {
9695
val curr = queue.poll()

0 commit comments

Comments
 (0)