Very Simple sort + greedy: No DP, no Binary Search, no Heap/PQ/BST
Split events into separate start & end, keep track of best event that has ended so far.\n\n\n# super clean, no need for DP or BST.\nclass Solution:\n    def max
Split events into separate start & end, keep track of best event that has ended so far.\n\n```\n# super clean, no need for DP or BST.\nclass Solution:\n    def maxTwoEvents(self, events: List[List[int]]) -> int:\n        proc = []\n        ans = m = 0  # m represents max value of finished event so far\n        for s,e,v in events:\n            proc.append( (s, True, v) )     # time, is_start, val\n            proc.append( (e+1, False, v) )  # use e+1 (inclusive)\n        proc.sort()  # sort by time\n        \n        for time, is_start, val in proc:\n            if is_start:\n                ans = max(ans, m+val)\n            else:\n                m = max(m, val)\n        return ans\n\n```
[]