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