Activity Selection — Earliest Finish Time

Max non-overlapping activities = sort by finish, sweep, take if start ≥ lastEnd

Activities

Run

Speed

Result

Activities n
6
lastEnd
−∞
Selected
0
Optimal?

Log

Timeline (sorted by finish time)

selected current candidate skipped (overlaps) pending lastEnd marker

Explanation

Load activities and press Run all to sort them by finish time and sweep with the earliest-finish-time greedy. Each activity is taken only if its start is at or after lastEnd.