Greedy
Take the locally best choice and never look back. Correct only when an exchange argument holds.
Greedy Choice: Coins where greedy fails
6 left. 4 fits, so take it once: 6 - 4 = 2.
Cost
- Space
- O(1)
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
Greedy Choice covers these too, in the same run.