Leetcode 2054. Two Best Non-Overlapping Events
Given a set of weighted intervals, pick at most two non-overlapping events (events are inclusive, so the next must start at least end+1) to maximize the sum of their values. This is a weighted two-interval selection problem that is typically solved by sorting events and using binary search or a prefix/suffix max sweep to find the best compatible pair.
Asked at:
Goldman Sachs
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late July, 2026
Goldman Sachs
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.