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 4543d3e commit 2508624Copy full SHA for 2508624
src/main/kotlin/g3401_3500/s3414_maximum_score_of_non_overlapping_intervals/Solution.kt
@@ -12,7 +12,7 @@ class Solution {
12
var dp1 = Array<IntArray?>(n) { IntArray(0) }
13
var dp = LongArray(n)
14
ns.sortWith { a: IntArray?, b: IntArray? -> a!![0] - b!![0] }
15
- (0..3).forEach { k ->
+ for (k in 0..3) {
16
val dp3 = arrayOfNulls<IntArray>(n)
17
val dp2 = LongArray(n)
18
dp3[n - 1] = intArrayOf(ns[n - 1]!![3])
0 commit comments