Try all combinations of coins that sum to the target.
With amount and smallest coin , you might use up to coins. The number of combinations grows exponentially.
Can you build the minimum for amount from solutions to smaller amounts?
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
The trap
Try all combinations of coins that sum to the target.
With amount and smallest coin , you might use up to coins. The number of combinations grows exponentially.
Can you build the minimum for amount from solutions to smaller amounts?