You are viewing a single comment's thread. Return to all comments →
Here is Python solution:
def getWays(n, c): # Write your code here dp = [0] * (n+1) dp[0] = 1 for i in range(m): for j in range(c[i], n+1): dp[j] += dp[j-c[i]] return dp[n]
Seems like cookies are disabled on this browser, please enable them to open this website
The Coin Change Problem
You are viewing a single comment's thread. Return to all comments →
Here is Python solution: