Skip to content

Commit 339942c

Browse files
committed
Improved task 3362
1 parent 6ff7232 commit 339942c

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/g3301_3400/s3362_zero_array_transformation_iii

1 file changed

+1
-1
lines changed

src/main/kotlin/g3301_3400/s3362_zero_array_transformation_iii/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import java.util.PriorityQueue
77

88
class Solution {
99
fun maxRemoval(nums: IntArray, queries: Array<IntArray>): Int {
10-
queries.sortWith { a: IntArray?, b: IntArray? -> a!![0] - b!![0] }
10+
queries.sortWith { a: IntArray, b: IntArray -> a[0] - b[0] }
1111
val last = PriorityQueue<Int?>(Comparator { a: Int?, b: Int? -> b!! - a!! })
1212
val diffs = IntArray(nums.size + 1)
1313
var idx = 0

0 commit comments

Comments
 (0)