Guided lesson

Activity Selection

Greedy

See the input

Intermediate

Input for Activity Selection: Sort by ending time and always take the compatible activity that finishes earliest.

8-30
35-58
63-88
Step 1 O(n log n) time - O(1) space
Guided progression
6% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart