Skip to content

Why greedy fails at coin change

Taking the largest coin that fits, repeatedly, is wrong for denominations {1, 3, 4} and a target of 6.

What does that show?