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