Thus if we need to pay 55c, and we do not hold a 50c coin, we could pay this as 2*20c + 10c + 5c to make a total of 4 coins. If we tender $1 we will receive 45c in change which also involves 4 coins, but if we tender $1.05 ($1 + 5c), we get 50c change and the total number of coins that changes hands is only 3.
I m not asking for solution , I don't get what example is saying:
so, we need to pay 55c , coins = {5,10,20} , 55c = 2*2 + 1*10 + 1*5 - 4 coins.
But what is next ? "if we tender 1$ we will receive 45c? what does it mean ? 1 - 45 = 55 ? yes , thats obvious , but the question is only asking how to change 55C?
and the last is 1.05? but for 1.05 case - they dont' tell what coins are available! Totally confusing
can someone give a bit more detail? i dont' understand the question and the example!