A simple approach David, but the greedy algorithm will have trouble with examples such as (givechange 40 '(25 20 10 5 1)) ![wink :wink:](https://www.theswamp.org/Smileys/black/wink.gif)
We Yanks don't have a 20p. Maybe the Founding Fathers were mathematicians as well and we didn't know it! -David
We Brits don't have 25p, I was just looking to the general case for an arbitrary set of denominations for which dynamic programming must be used
![wink :wink:](https://www.theswamp.org/Smileys/black/wink.gif)
Coincidentally, the greedy algorithm will produce the optimal result for the US currency system.