Leetcode 3414. Maximum Score of Non-overlapping Intervals
Given weighted intervals (sharing endpoints counts as overlapping), select up to four pairwise non-overlapping intervals that maximize the total weight and return the lexicographically smallest array of their original indices achieving that maximum. The challenge is efficiently choosing up to k=4 disjoint intervals (n up to 5·10^4, large coordinates) while handling tie-breaking by lexicographic index order.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.