comefrom: <awangdev>Best Time to Buy and Sell Stock III_3.java
code: public int maxProfit(int[] prices) {
          if (prices == null || prices.length == 0) {
              return 0;
          }
          int[] leftProfit = new int[prices.length];
          int[] rightProfit = new int[prices.length];
          int min = prices[0];    
          for (int i = 1; i < prices.length; i++) {
              min = Math.min(min, prices[i]);
              leftProfit[i] = Math.max(leftProfit[i - 1], prices[i] - min);
          }
          int max = prices[prices.length - 1];    
          for (int i = prices.length - 2; i >= 0; i--) {
              max = Math.max(max, prices[i]);
              rightProfit[i] = Math.max(rightProfit[i + 1], max - prices[i]);
          }
          int profit = 0;
          for (int i = 0; i < prices.length; i++) {
              profit = Math.max(profit, leftProfit[i] + rightProfit[i]);
          }
          return profit;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return 0 ;
    }
    int [ ] var_1 = new int [ var_0 . length ] ;
    int [ ] var_2 = new int [ var_0 . length ] ;
    int min = var_0 [ 0 ] ;
    for ( int var_3 = 1 ;
    var_3 < var_0 . length ;
    var_3 ++ ) {
      min = Math . min ( min , var_0 [ var_3 ] ) ;
      var_1 [ var_3 ] = Math . max ( var_1 [ var_3 - 1 ] , var_0 [ var_3 ] - min ) ;
    }
    int max = var_0 [ var_0 . length - 1 ] ;
    for ( int var_3 = var_0 . length - 2 ;
    var_3 >= 0 ;
    var_3 -- ) {
      max = Math . max ( max , var_0 [ var_3 ] ) ;
      var_2 [ var_3 ] = Math . max ( var_2 [ var_3 + 1 ] , max - var_0 [ var_3 ] ) ;
    }
    int var_4 = 0 ;
    for ( int var_3 = 0 ;
    var_3 < var_0 . length ;
    var_3 ++ ) {
      var_4 = Math . max ( var_4 , var_1 [ var_3 ] + var_2 [ var_3 ] ) ;
    }
    return var_4 ;
  }
  