Last active
August 29, 2015 14:04
-
-
Save kartikkukreja/f530d0dcea0582756be2 to your computer and use it in GitHub Desktop.
Interval Scheduling Problem Algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Let R be the set of all requests | |
| schedule = {} | |
| while !R.empty(): | |
| Choose a request i ∈ R that has the smallest finish time | |
| Add i to schedule | |
| Delete all requests from R that are incompatible with i | |
| return schedule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment