Y
Hacker News
new
|
ask
|
show
|
jobs
by
saulpw
921 days ago
And what algorithm did you use to find that? As per the comment you replied to, the greedy algorithm no longer works, and you have to exhaustively search through all possibilities of coins.
1 comments
couchand
920 days ago
Not the OP, but they appear to use the classic change-making algorithm "Dimes are Best".
It works like this: give dimes for change, they're the best coin (highest value density).
link
It works like this: give dimes for change, they're the best coin (highest value density).