Minimum Coin Change
H · hardPracticedp
Problem
Given coin denominations and a target amount, find the minimum number of coins needed.
Example
Input
3 11 1 5 6
Output
2
DP: dp[0]=0, dp[i]=min(dp[i-c]+1) for each coin c. Initialize dp with infinity.
5+6=11, using 2 coins