Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the events by its startTime.
For every event, you can either choose it and consider the next event available, or you can ignore it. You can efficiently find the next event that is available using binary search.