518. Coin Change 2

Description

Here

Intuition

Using regular dp will be hard to handle the duplication. Thus, we introduce the knapsack problem.

After using coin[i - 1], with coins[i]. What we can do about it?

Pitfall

Solution

results matching ""

    No results matching ""