comefrom: <awangdev>Largest Rectangle in Histogram_1.java
code: public int largestRectangleArea(int[] heights) {
          if (heights == null || heights.length == 0) {
              return 0;
          }
          int n = heights.length;
          int max = 0;
          Stack<Integer> stack = new Stack<>(); 
          for (int i = 0; i <= n; i++) {
              int currHeight = i == n ? -1 : heights[i];
              while (!stack.isEmpty() && currHeight <= heights[stack.peek()]) {
                  int currPeekHeight = heights[stack.pop()];
                  int width = stack.isEmpty() ? i : i - stack.peek() - 1;
                  max = Math.max(max, currPeekHeight * width);
              }
              stack.push(i);
          }
  
          return max;
      }
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 max = 0 ;
    Stack < Integer > var_2 = new Stack < > ( ) ;
    for ( int var_3 = 0 ;
    var_3 <= var_1 ;
    var_3 ++ ) {
      int var_4 = var_3 == var_1 ? - 1 : var_0 [ var_3 ] ;
      while ( ! var_2 . isEmpty ( ) && var_4 <= var_0 [ var_2 . peek ( ) ] ) {
        int var_5 = var_0 [ var_2 . pop ( ) ] ;
        int var_6 = var_2 . isEmpty ( ) ? var_3 : var_3 - var_2 . peek ( ) - 1 ;
        max = Math . max ( max , var_5 * var_6 ) ;
      }
      var_2 . push ( var_3 ) ;
    }
    return max ;
  }
  