@Maurits: You're lucky then, that the US coin selection is "perfect" for making change. The greedy algorithm (pay the largest value coin less than the running total) will always result in getting the right amount with the fewest coins.
This is not always the case with the rest of the world. For particularly for pathological coin values (1 Galleons = 17 Sickles = 493 Knuts being the best known) you can end up having to do backtracking / alternate strategies just to make "optimal" change. I believe its NP hard, in general...