public int numberOfSolutions(int total, int coins[]){
        int temp[][] = new int[coins.length+1][total+1];
        for(int i=0; i <= coins.length; i++){
            temp[i][0] = 1;
        }
        for(int i=1; i <= coins.length; i++){
            for(int j=1; j <= total ; j++){
                if(coins[i-1] > j){
                    temp[i][j] = temp[i-1][j];
                }
                else{
                    temp[i][j] = temp[i][j-coins[i-1]] + temp[i-1][j];
                }
            }
        }
        return temp[coins.length][total];
    }
@Date 08/01/2014
@author Tushar Roy

Given a total and coins of certain denominations find number of ways total
can be formed from coins assuming infinity supply of coins

References:
http://www.geeksforgeeks.org/dynamic-programming-set-7-coin-change/
src/com/interview/dynamic/CoinChanging.java