We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ff7232 commit 339942cCopy full SHA for 339942c
src/main/kotlin/g3301_3400/s3362_zero_array_transformation_iii/Solution.kt
@@ -7,7 +7,7 @@ import java.util.PriorityQueue
7
8
class Solution {
9
fun maxRemoval(nums: IntArray, queries: Array<IntArray>): Int {
10
- queries.sortWith { a: IntArray?, b: IntArray? -> a!![0] - b!![0] }
+ queries.sortWith { a: IntArray, b: IntArray -> a[0] - b[0] }
11
val last = PriorityQueue<Int?>(Comparator { a: Int?, b: Int? -> b!! - a!! })
12
val diffs = IntArray(nums.size + 1)
13
var idx = 0
0 commit comments