Concept Flow - Coin Change Minimum Coins
Start with amount
Initialize DP array with Infinity
Set dp[0
For each coin
For each amount from coin to target
Update dp[amount
After all coins processed
Check dp[target
Yes No
Return -1
We build a table dp where dp[x] is the minimum coins needed for amount x. We update dp by trying each coin for all amounts up to target.
