Python: Actually simple with heap
So, notice that if we sort events, then we always have the left bound increasing. Therefore, we can keep a heap of (right_bound, value) tuples from events that 
So, notice that if we sort events, then we always have the left bound increasing. Therefore, we can keep a heap of (right_bound, value) tuples from events that we have seen so far. Whenever the current left bound becomes larger than the right_bound on the stack, that means we can start poppping from the heap to look for the next possible interval pairing. We simply record the best value seen so far, and since every next event has a larger left, we can always pair with the values that have popped off the heap.\n\nPlease upvote if helpful!\n```\nclass Solution:\n    def maxTwoEvents(self, events: List[List[int]]) -> int:\n        events.sort()\n        res = 0\n        best_value_to_the_left_of_all_intervals = 0\n        intervals_seen_so_far = []\n        for left, r, v in events:\n            heappush(intervals_seen_so_far, (r, v))\n            while intervals_seen_so_far and intervals_seen_so_far[0][0] < left:\n                R, V = heappop(intervals_seen_so_far)\n                best_value_to_the_left_of_all_intervals = max(best_value_to_the_left_of_all_intervals, V)\n            res = max(res, best_value_to_the_left_of_all_intervals + v)\n        return res
[]