Algorithm Summary
A greedy algorithm chooses the best-looking option at each stage with the goal of reaching a global optimum. Try a greedy approach when a locally optimal choice appears to preserve the best possible future outcome and you cannot construct a counterexample.
The implementation is often short; the difficult part is the proof. Look for an exchange argument, an invariant, or a way to show that delaying the locally optimal choice can never improve the final result.