← Back to Algorithms

Activity Selection

Selects the maximum number of activities that can be performed by a single person, assuming that a person can only work on a single activity at a time.

Time: O(n log n)
Space: O(1)

How it works