Skip to content

Commit 838b529

Browse files
committed
Improved task 3414
1 parent d1cb8ee commit 838b529

File tree

1 file changed

+1
-2
lines changed
  • src/main/kotlin/g3401_3500/s3414_maximum_score_of_non_overlapping_intervals

1 file changed

+1
-2
lines changed

src/main/kotlin/g3401_3500/s3414_maximum_score_of_non_overlapping_intervals/Solution.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package g3401_3500.s3414_maximum_score_of_non_overlapping_intervals
22

33
// #Hard #Array #Dynamic_Programming #Sorting #Binary_Search
4-
// #2025_01_09_Time_918_(100.00%)_Space_87.41_(100.00%)
4+
// #2025_01_09_Time_892_(100.00%)_Space_91.42_(100.00%)
55

66
class Solution {
77
fun maximumWeight(intervals: List<List<Int>>): IntArray {
@@ -10,7 +10,6 @@ class Solution {
1010
ns.sortBy { it[0] }
1111
var dp1 = Array<IntArray>(n) { IntArray(0) }
1212
var dp = LongArray(n)
13-
ns.sortWith { a: IntArray?, b: IntArray? -> a!![0] - b!![0] }
1413
repeat(4) {
1514
val dp3 = Array<IntArray>(n) { IntArray(0) }
1615
val dp2 = LongArray(n)

0 commit comments

Comments
 (0)