Premium Content - Free Preview
You're working on a scheduler app. The user would like to attend as many events as possible but cannot attend events that overlap. Can you find the schedule with the greatest number of non-overlapping events?
See if you can find an O(n log n) solution.
You will be given a list of n numbers. The numbers consist of n/2 pairs, where each pair is the
end time of an event. Find the optimal schedule of events and print each time like this:
[start , end].