public int largestRectangleArea_naive(int[] height) {
        if (height == null || height.length == 0)
            return 0;
        int[] max = new int[height.length];
        int ans = 0;
        for (int i = 0; i < height.length; ++i) {
            int min = height[i];
            ans = Math.max(ans, min);
            for (int j = i + 1; j < height.length; ++j) {
                min = Math.min(min, height[j]);
                max[j] = min * (j - i + 1);
                ans = Math.max(ans, max[j]);
            }
        }
        return ans;
    }