Coin change
Level 2 of 3
Also called Change-making problem and Fewest coins, by dynamic programming.
Finds the fewest coins that make an amount exactly, any coin used as often as needed. Taking the biggest coin first is not always fewest, so every amount from 0 up is answered in turn, each built from the answers for the amounts a coin less.
the fewest coins for each amount
- coins tried
- 0
step 1 of 1
Examples