mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
@ -101,7 +101,7 @@ dp[j] (考虑coins[i]的组合总和) 就是所有的dp[j - coins[i]](不
|
||||
|
||||
而本题要求凑成总和的组合数,元素之间要求没有顺序。
|
||||
|
||||
所以纯完全背包是能凑成总结就行,不用管怎么凑的。
|
||||
所以纯完全背包是能凑成总和就行,不用管怎么凑的。
|
||||
|
||||
本题是求凑出来的方案个数,且每个方案个数是为组合数。
|
||||
|
||||
@ -207,6 +207,7 @@ class Solution {
|
||||
|
||||
Python:
|
||||
|
||||
|
||||
```python3
|
||||
class Solution:
|
||||
def change(self, amount: int, coins: List[int]) -> int:
|
||||
@ -222,7 +223,6 @@ class Solution:
|
||||
|
||||
|
||||
|
||||
|
||||
Go:
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user