๐ฎ Dynamic Programming (Practice)
Companion to the Dynamic Programming guide. Watch the DP table fill bottom-up for coin change, then implement it.
๐ฌ Watch it workโ
Coin Change โ dp[a] = fewest coins for amount aStep 1 / 13
dp[a] = min coins to make amount a. dp[0]=0.
๐ Your turnโ
Loading editorโฆ
๐ง Challenge yourselfโ
- Return the actual coins used, not just the count.
- Count the number of ways to make the amount (combinations).
- Turn the 0/1 knapsack into a similar table โ what changes?
Continue the path โ Graph Theory