Proof by Swap
Seeing why greedy never loses.
This animation plays activity selection — pick as many non-overlapping meetings as possible — on a timeline of colored interval bars, and then proves the greedy choice correct in front of you.
First, watch the sort: the bars slide into order by end time, not start time. That key is the entire trick. Then a cursor sweeps left to right, adopting the earliest-ending bar that fits — each adopted bar locks in green, and every bar that clashes with it grays out. Notice what the early end time buys: the more room it leaves to the right, the more future bars survive.
The second half is the exchange argument made visible. A split-screen panel shows a hypothetical optimal schedule that made a different first choice. Watch its first interval get swapped out for the greedy pick: because the greedy bar ends no later, everything downstream still fits, and the meeting count stays exactly equal through the swap. Repeat the swap along the schedule and the "optimal" timeline morphs, bar by bar, into the greedy one — same count the whole way. That is the proof: any optimal solution can be exchanged into greedy's, so greedy never loses.