-
coin change problem
Illustrate the execution of the Coin Change algorithm on n = 10 in the system of denominations d(1) = 1, d(2) = 5, and d(3) = 8.
so i have n = 10 with denominations of d(1) = 1, d(2) = 5, d(3) = 8
so the execution of the coin problem will be: 1 * 1 + 2 * 5 + 3 * 8
so it will be using 2 nickels of 5. is this right or am i doing something wrong.
-
Re: coin change problem
Yes, "2 nickels of 5" is less than for example "1 of 8 plus 2 of 1".
However, I don't see any algorithm in your OP.