In this article we are going to discuss "Coin Change Permutations-2" which is a slight variation from the previous question.
If you haven't gone through the problem yet, we suggest you to do it now.
- You are given a number n, representing the count of coins.
- You are given n numbers, representing the denominations of n coins.
- You are given a number "amt".
You are required to calculate and print the permutations of the n coins (same coin can be used again any number of times) using which the amount "amt" can be paid.
Reader, did you notice that the difference between the previous question and this question is that in the former problem we were not allowed to use the same coin again however we are allowed to do so here. Say, the given denominations are [2,3,5,7] and the amount to be paid is '12'.