comefrom: <gouthampradhan>dynamic_programming_MinimumCostForTickets_1.java
code: public int mincostTickets(int[] days, int[] costs) {
      int[] min = new int[days.length];
      Arrays.fill(min, Integer.MAX_VALUE);
      for (int i = days.length - 1; i >= 0; i--) {
        for (int j = 0; j < costs.length; j++) {
          if (j == 0) {
            min[i] = Math.min(min[i], costs[j] + ((i + 1 >= min.length) ? 0 : min[i + 1]));
          } else if (j == 1) {
            int c = 0;
            for (int k = i + 1; k < days.length; k++) {
              if (days[k] >= (days[i] + 7)) {
                c = min[k];
                break;
              }
            }
            min[i] = Math.min(min[i], costs[j] + c);
          } else {
            int c = 0;
            for (int k = i + 1; k < days.length; k++) {
              if (days[k] >= (days[i] + 30)) {
                c = min[k];
                break;
              }
            }
            min[i] = Math.min(min[i], costs[j] + c);
          }
        }
      }
      return min[0];
    }
masked: public int sample_funcname ( int [ ] var_0 , int [ ] var_1 ) {
    int [ ] min = new int [ var_0 . length ] ;
    Arrays . fill ( min , Integer . MAX_VALUE ) ;
    for ( int var_2 = var_0 . length - 1 ;
    var_2 >= 0 ;
    var_2 -- ) {
      for ( int var_3 = 0 ;
      var_3 < var_1 . length ;
      var_3 ++ ) {
        if ( var_3 == 0 ) {
          min [ var_2 ] = Math . min ( min [ var_2 ] , var_1 [ var_3 ] + ( ( var_2 + 1 >= min . length ) ? 0 : min [ var_2 + 1 ] ) ) ;
        }
        else if ( var_3 == 1 ) {
          int var_4 = 0 ;
          for ( int var_5 = var_2 + 1 ;
          var_5 < var_0 . length ;
          var_5 ++ ) {
            if ( var_0 [ var_5 ] >= ( var_0 [ var_2 ] + 7 ) ) {
              var_4 = min [ var_5 ] ;
              break ;
            }
          }
          min [ var_2 ] = Math . min ( min [ var_2 ] , var_1 [ var_3 ] + var_4 ) ;
        }
        else {
          int var_4 = 0 ;
          for ( int var_5 = var_2 + 1 ;
          var_5 < var_0 . length ;
          var_5 ++ ) {
            if ( var_0 [ var_5 ] >= ( var_0 [ var_2 ] + 30 ) ) {
              var_4 = min [ var_5 ] ;
              break ;
            }
          }
          min [ var_2 ] = Math . min ( min [ var_2 ] , var_1 [ var_3 ] + var_4 ) ;
        }
      }
    }
    return min [ 0 ] ;
  }
  