Problem Statement:
Given an integer array of coins[ ] of size N representing different types of currency and an
integer sum, The task is to find the number of ways to make sum by using different
combinations from coins[].
Note: Assume that you have an infinite supply of each type of coin.
Input:
sum = 4, coins[] = {1,2,3},
Output:
4
there are four solutions: {1, 1, 1, 1}, {1, 1, 2}, {2, 2}, {1, 3}.