error: cannot solve it. DP equation: dp[i] = sum(num + dp[i - num]), where num is a number of nums vector, dp[i] is the total solution of sum to i. Also, initial dp[0] = 1 So that we can use memorize recursion,
error:
cannot solve it. DP equation:
dp[i] = sum(num + dp[i - num]), where num is a number of nums vector, dp[i] is the total solution of sum to i.
Also, initial dp[0] = 1
So that we can use memorize recursion,