Relative Content

Tag Archive for c++dynamic-programming

stuck on the last test case, it prints the answer except the first and the last digits

i was solving this DP question on leetcode in which we are given an integer array c representing coins of different denominations and an integer x representing a total amount of money and we need to return the number of combinations that make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0.