Skip to content

Instantly share code, notes, and snippets.

@kartikkukreja
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save kartikkukreja/7d44af1cbcc0abfff2cd to your computer and use it in GitHub Desktop.

Select an option

Save kartikkukreja/7d44af1cbcc0abfff2cd to your computer and use it in GitHub Desktop.
Weighted Interval Scheduling Problem
OPT(j):
if j == 0:
return 0
return max(wj + OPT(p(j)), OPT(j-1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment