<awangdev>Burst Balloons_1.java
public int maxCoins(int[] nums) {
        if (nums == null || nums.length == 0) {
            return 0;
        }
        int n = nums.length;
        int[] values = new int[n + 2];
        values[0] = 1;
        values[n + 1] = 1;
        for (int i = 1; i <= n; i++) {
            values[i] = nums[i - 1];
        }
        
        n = values.length;
        int[][] dp = new int[n][n]; 
        for (int len = 3; len <= n; len++) {
            for (int i = 0; i <= n - len; i++) {
                int j = len + i - 1;
                for (int k = i + 1; k < j; k++) {
                    dp[i][j] = Math.max(dp[i][j], dp[i][k] + dp[k][j] + values[i] * values[k] * values[j]);
                }
            }
        }
        
        return dp[0][n - 1];
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  int var_4 = var_0 . length ;
  int [ ] var_6 = new int [ var_4 + 2 ] ;
  var_6 [ 0 ] = 1 ;
  var_6 [ var_4 + 1 ] = 1 ;
  for ( int var_8 = 1 ;
  var_8 <= var_4 ;
  var_8 ++ ) {
    var_6 [ var_8 ] = var_0 [ var_8 - 1 ] ;
  }
  var_4 = var_6 . length ;
  int [ ] [ ] var_9 = new int [ var_4 ] [ var_4 ] ;
  for ( int var_11 = 3 ;
  var_11 <= var_4 ;
  var_11 ++ ) {
    for ( int var_8 = 0 ;
    var_8 <= var_4 - var_11 ;
    var_8 ++ ) {
      int var_12 = var_11 + var_8 - 1 ;
      for ( int var_13 = var_8 + 1 ;
      var_13 < var_12 ;
      var_13 ++ ) {
        var_9 [ var_8 ] [ var_12 ] = Math . max ( var_9 [ var_8 ] [ var_12 ] , var_9 [ var_8 ] [ var_13 ] + var_9 [ var_13 ] [ var_12 ] + var_6 [ var_8 ] * var_6 [ var_13 ] * var_6 [ var_12 ] ) ;
      }
    }
  }
  return var_9 [ 0 ] [ var_4 - 1 ] ;
}
