News

For example, if coins had the values 1, 7, and 10, the greedy algorithm would represent 14 as 10 + 1 + 1 + 1 + 1, whereas the combination 7 + 7 uses fewer coins.