Python minheap solution | Leetcode 1477
\ndef maxTwoEvents(self, events: List[List[int]]) -> int:\n\tq, cur, ans = [], 0, 0\n\tfor s, e, v in sorted(events):\n\t\twhile(q and q[0][0]<s):\n\t\t\tcur = 
```\ndef maxTwoEvents(self, events: List[List[int]]) -> int:\n\tq, cur, ans = [], 0, 0\n\tfor s, e, v in sorted(events):\n\t\twhile(q and q[0][0]<s):\n\t\t\tcur = max(cur, heappop(q)[1])\n\t\tans = max(ans, cur+v)\n\t\theappush(q, (e, v))\n\treturn ans\n```\nSimilar problem:\n[1477. Find Two Non-overlapping Sub-arrays Each With Target Sum](https://leetcode.com/problems/find-two-non-overlapping-sub-arrays-each-with-target-sum/discuss/2697518/Python-prefix-sum-solution-or-min_heap-or-Leetcode-2054)
[]