def largestRectangleArea(self, height):
        increasing, area, i = [], 0, 0
        while i <= len(height):
            if not increasing or (i < len(height) and height[i] > height[increasing[-1]]):
                increasing.append(i)
                i += 1
            else:
                last = increasing.pop()
                if not increasing:
                    area = max(area, height[last] * i)
                else:
                    area = max(area, height[last] * (i - 1 - increasing[-1] ))
        return area
dataset/ETHPy150Open kamyu104/LeetCode/Python/largest-rectangle-in-histogram.py/Solution.largestRectangleArea/swapped operands of `-`