Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
0 points
saulpw
2y ago
0 comments
Share
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.
undefined | Better HN
0 comments
default
newest
oldest
couchand
2y 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).
j
/
k
navigate · click thread line to collapse