public int largestRectangleArea(int[] height) {
        // Start typing your Java solution below
        // DO NOT write main() function

        if (height == null || height.length == 0) {
            return 0;
        }

        int[] aux = new int[height.length];

        return solve(height, 0, height.length - 1, aux);
    }