File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/kotlin/g3201_3300
s3286_find_a_safe_walk_through_a_grid
s3288_length_of_the_longest_increasing_path Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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()
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments