09-09 leetcode-0377
题目
Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.
题解
最基础的 DP 题目,状态转移方程 dp[i] = dp[i] + dp[i - num]
1 | class Solution: |
Comments
Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.
最基础的 DP 题目,状态转移方程 dp[i] = dp[i] + dp[i - num]
1 | class Solution: |