Your skill will accomplish what the force of many cannot 

PerlMonks 
Re: Re^2: (Golf) Giving Changeby no_slogan (Deacon) 
on Jun 12, 2001 at 05:21 UTC ( #87702=note: print w/ replies, xml )  Need Help?? 
With certain combinations of currency, the greedy strategy won't work so well. Imagine you need to give 30 cents change, using US coins but not nickels. The intuitively "correct" solution is three dimes, but the greedy strategy will give one quarter and five pennies. If you want to define the greedy answer to be the correct one, that's fine, but you didn't make that clear in the problem statement. If the coins are a little stranger, the greedy strategy will fail altogether. Maybe the land of Frobozz has 2frob and 3frob coins, but no 1frob coin. You can make 7 frobs with one 3 and two 2s, but if you start out by giving two 3s, you're stuck. We could define a "generalized penny" to be a coin which every other coin is a multiple of. The penny and the yen are both "pennies" by this definition. If such a coin exists, the greedy method will always produce an answer. There's no frobpenny in my example, though.
In Section
Meditations

