Time Scheduler
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.
I/O Format
You will be given a list of n numbers. The numbers consist of n/2 pairs, where each pair is the start
and end
time of an event. Find the optimal schedule of events and print each time like this: [start , end]
.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.
Comments
Learneroo
May 14, 8:53 PMIf you're looking for code to get started, this Java code converts the input into Tuples, and added a helpful compareTo method to the Tuples.