Given coin denominations and a target amount, find the minimum number of coins needed. A classic DP problem that shows why greedy fails โ and how bottom-up tabulation always finds the optimal answer.
Greedy always picks the largest coin first. With coins [1, 3, 4] and target 6: greedy picks 4+1+1 = 3 coins. DP finds 3+3 = 2 coins. The optimal substructure of this problem requires DP, not greedy.