Back to all patterns

Dynamic Programming (Unbounded Knapsack)

2 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Dynamic Programming (Unbounded Knapsack) pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (2)

Coin Change

Find minimum coins needed to make an amount (unbounded knapsack).

Key Signals:

Minimize coinsCan reuse coinsdp[i] = min(dp[i], dp[i-coin] + 1)
Coin Change II

Count number of ways to make an amount using given coins.

Key Signals:

Count combinationsInclude or exclude coin2D or optimized to 1D