Loading page…
A greedy algorithm builds an answer one choice at a time with a fixed rule and never takes a choice back. It is right only when the rule is safe. Interval scheduling shows it: sort the talks by end time and take each talk that fits, which an exchange argument and a stays-ahead argument both prove safe. Earliest start and shortest first fail on the same talks, and biggest coin first fails for coins worth one, three and four.
You work on the schedule page of a one day tech festival.