Skip to main content

๐ŸŽฎ 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
0
0
0
0
0
0
0
0
0
0
0
0
dp[a] = min coins to make amount a. dp[0]=0.

๐Ÿ Your turnโ€‹

Loading editorโ€ฆ

๐Ÿง  Challenge yourselfโ€‹

  1. Return the actual coins used, not just the count.
  2. Count the number of ways to make the amount (combinations).
  3. Turn the 0/1 knapsack into a similar table โ€” what changes?

Continue the path โ†’ Graph Theory