You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classic approach to this kind of interval problem.
First we sort by end, guaranteeing that we take the class that will be freed the soonest. Then, we take classes as long as they don't intersect with the last taken class.