Items can be reused unlimited times; the recurrence stays at the same index after taking an item, instead of always moving forward.
Sub-patterns
- A — Coin Change (Min Coins). Fewest coins to reach a target amount.
- B — Coin Change (Count Ways). How many distinct combinations reach a target amount.
- C — Combination Sum as DP. The DP formulation of the combination-sum family.
Practice set (4)
- Medium — Coin Change, Coin Change II, Combination Sum IV, Minimum Cost For Tickets
Pending
Coin Change (Min Coins)
Find the fewest coins needed to reach a target amount, reusing denominations freely.
Pending
Coin Change (Count Ways)
Count the distinct combinations of coins that reach a target amount.
Pending
Combination Sum as DP
The DP formulation of the combination-sum family, reusing elements without limit.
Notes from readers
Comments — via GitHub