Data Structures, Algorithms, & Applications in C++
Chapter 17, Exercise 5
No, the greedy algorithm no longer guarantees to provide change using
the fewest number of coins.
For example, suppose we want to provide 48 cents in change.
The greedy algorithm
will give out three 14 cent coins, one nickel, and one penny; for a total of
five coins.
An optimal algorithm will give out four 12
cent coins in change.