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

Contact Us
Sign in or email us at [email protected]