This is a very common problem with solutions posted on the internet. There are 2 input parameters, an amount, and a denominations array. We need to find the total ways the a