Free written solution

Two Best Non-Overlapping Events (LeetCode 2054): Solution and Explanation

Pick at most two events that do not overlap (times are inclusive) to maximize the sum of their values.

Read the intuition, approach, code and complexity →