Practice
Learn
← Quit
0 / 0 correct
Algorithms
Medium
1 of 20
Coin change (minimum coins for amount A with denominations): why does greedy sometimes fail?
A
Coins must be sorted descending first
B
Greedy always works
C
Greedy is too slow
D
For some coin systems (e.g. {1, 3, 4} for 6), taking the largest coin first isn't optimal; use DP