<gouthampradhan>dynamic_programming_CoinChange2_1.java
private int dp(int[][] dp, int i, int[] coins, int l, int n) {
    if (n == 0) return 1;
    else if (i >= l) return 0;
    if (n < 0) return 0;
    if (dp[i][n] != -1) return dp[i][n];
    dp[i][n] = dp(dp, i + 1, coins, l, n) + dp(dp, i, coins, l, n - coins[i]);
    return dp[i][n];
  }
private int sample_funcname ( int [ ] [ ] dp , int i , int [ ] coins , int l , int n ) {
  if ( n == 0 ) return 1 ;
  else if ( i >= l ) return 0 ;
  if ( n < 0 ) return 0 ;
  if ( dp [ i ] [ n ] != - 1 ) return dp [ i ] [ n ] ;
  dp [ i ] [ n ] = dp ( dp , i + 1 , coins , l , n ) + dp ( dp , i , coins , l , n - coins [ i ] ) ;
  return dp [ i ] [ n ] ;
}
