Change with standard coins
Coins come in [25, 10, 5, 1]. Write change(amount) that returns the
list of coins, largest first, that makes amount with the fewest coins.
amount is zero or more.
change(67) -> [25, 25, 10, 5, 1, 1]
change(30) -> [25, 5]
change(0) -> []
The point is to practise a greedy loop, and to notice that it is correct
for these coins because every coin is a multiple of the one below it,
except the 25, which the 10 and 5 fill under neatly. Change the coins to
[25, 10, 1] and the same code gives six coins for 30 where three would
do.
def change(amount):
...