File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/main/kotlin/g3501_3600/s3552_grid_teleportation_traversal Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ package g3501_3600.s3552_grid_teleportation_traversal
55import java.util.LinkedList
66import java.util.Queue
77
8+ @Suppress(" kotlin:S107" )
89class 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()
You can’t perform that action at this time.
0 commit comments