Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kartikkukreja/29a351b77bb51cbc799d to your computer and use it in GitHub Desktop.
Save kartikkukreja/29a351b77bb51cbc799d to your computer and use it in GitHub Desktop.
Scheduling to minimize lateness algorithm
sort the jobs in non-decreasing order of their deadlines
last_finished = s[1]
for i = 1 to n:
Assign job i to the interval [last_finished, last_finished + t[i]]
last_finished += t[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment