Prize Schedule
Harddynamic programmingbinary search
Each entry in events is [start, end, prize] for a tournament you could enter. You can only play in one tournament at a time, but a tournament that starts exactly when another ends is fine.
Return the largest total prize you can win.
Examples
Input: events = [[1,3,50],[2,5,20],[4,6,70],[6,7,60]]
Output: 180
Input: events = [[1,10,5],[2,3,4],[3,4,4]]
Output: 8