comefrom: <awangdev>122. Best Time to Buy and Sell Stock II_4.java
code: public int maxProfit(int[] prices) {
          if (prices == null || prices.length == 0) {
              return 0;
          }
          int n = prices.length;
          int[][] dp = new int[2][2];
          dp[0][0] = dp[0][1] = 0;
          dp[1][0] = - prices[0];
          for (int i = 2; i <= n; i++) {
              dp[i % 2][0] = Math.max(dp[(i - 1) % 2][0], dp[(i - 1) % 2][1] - prices[i - 1]);
              dp[i % 2][1] = Math.max(dp[(i - 1) % 2][1], dp[(i - 1) % 2][0] + prices[i - 1]);
          }
          return dp[n % 2][1];
      }
masked: 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 [ 2 ] [ 2 ] ;
    var_6 [ 0 ] [ 0 ] = var_6 [ 0 ] [ 1 ] = 0 ;
    var_6 [ 1 ] [ 0 ] = - var_0 [ 0 ] ;
    for ( int var_8 = 2 ;
    var_8 <= var_4 ;
    var_8 ++ ) {
      var_6 [ var_8 % 2 ] [ 0 ] = Math . max ( var_6 [ ( var_8 - 1 ) % 2 ] [ 0 ] , var_6 [ ( var_8 - 1 ) % 2 ] [ 1 ] - var_0 [ var_8 - 1 ] ) ;
      var_6 [ var_8 % 2 ] [ 1 ] = Math . max ( var_6 [ ( var_8 - 1 ) % 2 ] [ 1 ] , var_6 [ ( var_8 - 1 ) % 2 ] [ 0 ] + var_0 [ var_8 - 1 ] ) ;
    }
    return var_6 [ var_4 % 2 ] [ 1 ] ;
  }
  