Task Scheduling

About the algorithm:


An interesting problem of optimally scheduling unit-time tasks on a single processor, where each task has a deadline, along with a penalty that must be paid if the deadline is missed.


Time Complexity:O(nlogn)

Input:
Start time End time
Output:
Following Tasks are selected: