Data structures · Recursion
A vending machine paying out change wants the fewest coins, and the obvious method of grabbing the biggest coin first is sometimes wrong.