Activity Selection

Back to Classic Problems (Greedy)

Select the maximum number of non-overlapping activities from a set with start and finish times. The greedy strategy of always choosing the activity that finishes earliest produces an optimal solution. O(n log n) after sorting.

algorithms greedy activity-selection