<awangdev>Maximal Rectangle_1.java
private int findLargestRectInHistogram(int[] height) {

        Stack<Integer> stack = new Stack<>();
        int m = height.length;
        int max = 0;
        for (int i = 0; i <= m; i++) {
            int currHeight = i == m ? -1 : height[i];
            while (!stack.isEmpty() && currHeight <= height[stack.peek()]) {
                int peekHeight = height[stack.pop()];
                int width = stack.isEmpty() ? i : i - stack.peek() - 1;
                max = Math.max(max, peekHeight * width);
            }
            stack.push(i);
        }
        return max;
    }
private int sample_funcname ( int [ ] var_0 ) {
  Stack < Integer > var_3 = new Stack < > ( ) ;
  int var_5 = var_0 . length ;
  int max = 0 ;
  for ( int var_8 = 0 ;
  var_8 <= var_5 ;
  var_8 ++ ) {
    int var_10 = var_8 == var_5 ? - 1 : var_0 [ var_8 ] ;
    while ( ! var_3 . isEmpty ( ) && var_10 <= var_0 [ var_3 . peek ( ) ] ) {
      int var_14 = var_0 [ var_3 . pop ( ) ] ;
      int var_15 = var_3 . isEmpty ( ) ? var_8 : var_8 - var_3 . peek ( ) - 1 ;
      max = Math . max ( max , var_14 * var_15 ) ;
    }
    var_3 . push ( var_8 ) ;
  }
  return max ;
}
