comefrom: <gouthampradhan>dynamic_programming_TossStrangeCoins_1.java
code: public double probabilityOfHeads(double[] prob, int target) {
      double[][] DP = new double[target + 1][prob.length];
      DP[0][0] = 1 - prob[0];
      DP[1][0] = prob[0];
      for (int c = 1; c < prob.length; c++) {
        for (int t = 0; t <= target; t++) {
          if (t == 0) DP[t][c] = DP[t][c - 1] * (1 - prob[c]);
          else DP[t][c] = DP[t][c - 1] * (1 - prob[c]) + DP[t - 1][c - 1] * (prob[c]);
        }
      }
      return DP[target][prob.length - 1];
    }
masked: public double sample_funcname ( double [ ] var_0 , int var_1 ) {
    double [ ] [ ] var_4 = new double [ var_1 + 1 ] [ var_0 . length ] ;
    var_4 [ 0 ] [ 0 ] = 1 - var_0 [ 0 ] ;
    var_4 [ 1 ] [ 0 ] = var_0 [ 0 ] ;
    for ( int var_6 = 1 ;
    var_6 < var_0 . length ;
    var_6 ++ ) {
      for ( int var_7 = 0 ;
      var_7 <= var_1 ;
      var_7 ++ ) {
        if ( var_7 == 0 ) var_4 [ var_7 ] [ var_6 ] = var_4 [ var_7 ] [ var_6 - 1 ] * ( 1 - var_0 [ var_6 ] ) ;
        else var_4 [ var_7 ] [ var_6 ] = var_4 [ var_7 ] [ var_6 - 1 ] * ( 1 - var_0 [ var_6 ] ) + var_4 [ var_7 - 1 ] [ var_6 - 1 ] * ( var_0 [ var_6 ] ) ;
      }
    }
    return var_4 [ var_1 ] [ var_0 . length - 1 ] ;
  }
  