collections/interval_scheduling_utils library

Interval scheduling: max non-overlapping intervals (roadmap #445).

Classes

IntervalSchedulingUtils
Interval with start and end (inclusive or exclusive per usage).

Functions

maxNonOverlappingIntervals(List<IntervalSchedulingUtils> intervals) List<IntervalSchedulingUtils>
Returns a maximal set of non-overlapping intervals from intervals, chosen by earliest end time (greedy).