Skip to content

Commit 7566f21

Browse files
committed
Fixed sonar
1 parent 0be9e8c commit 7566f21

File tree

2 files changed

+3
-3
lines changed
  • src/main/kotlin/g3201_3300

2 files changed

+3
-3
lines changed

src/main/kotlin/g3201_3300/s3286_find_a_safe_walk_through_a_grid/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Solution {
1616
val bfs: Queue<IntArray?> = LinkedList<IntArray>()
1717
bfs.add(intArrayOf(0, 0, health - grid[0][0]))
1818
visited[0]!![0][health - grid[0][0]] = true
19-
while (!bfs.isEmpty()) {
19+
while (bfs.isNotEmpty()) {
2020
var size = bfs.size
2121
while (size-- > 0) {
2222
val currNode = bfs.poll()

src/main/kotlin/g3201_3300/s3288_length_of_the_longest_increasing_path/Solution.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Solution {
3838
return longestIncreasingLength(upper) + longestIncreasingLength(lower) + 1
3939
}
4040

41-
private fun longestIncreasingLength(array: MutableList<IntArray>): Int {
41+
private fun longestIncreasingLength(array: List<IntArray>): Int {
4242
val list: MutableList<Int?> = ArrayList<Int?>()
4343
for (pair in array) {
4444
val m = list.size
@@ -52,7 +52,7 @@ class Solution {
5252
return list.size
5353
}
5454

55-
private fun binarySearch(list: MutableList<Int?>, target: Int): Int {
55+
private fun binarySearch(list: List<Int?>, target: Int): Int {
5656
val n = list.size
5757
var left = 0
5858
var right = n - 1

0 commit comments

Comments
 (0)