Given coins of different denominations and a total, in how many ways can we combine these coins to get the total? Let's say we have coins = {1, 2, 3} and a total = 5, we can get the total in 5 ways:
1 1 1 1 1
1 1 1 2
1 1 3
1 2 2
2 3
The problem is closely related to knapsack problem. The o...