C++ solution, clean code
int largestRectangleArea(vector<int>& height) {\n        height.push_back(0);\n        const int size_h = height.size();\n        stack<int> stk;\n        int i
    int largestRectangleArea(vector<int>& height) {\n        height.push_back(0);\n        const int size_h = height.size();\n        stack<int> stk;\n        int i = 0, max_a = 0;\n        while (i < size_h) {\n            if (stk.empty() || height[i] >= height[stk.top()]) stk.push(i++);\n            else {\n                int h = stk.top();\n                stk.pop();\n                max_a = max(max_a, height[h] * (stk.empty() ? i : i - stk.top() - 1));\n            }\n        }\n        return max_a;\n    }
[]