public int solve(int[] height, int left, int right, int[] aux) {
        if (left > right) {
            return 0;
        } else if (left == right) {
            return height[left];
        } else {
            int mid = (left + right) / 2;

            int leftMax = solve(height, left, mid - 1, aux);
            int rightMax = solve(height, mid + 1, right, aux);
            int result = Math.max(leftMax, rightMax);
            result = Math.max(result, baseCase(height, mid, left, right, aux));
            return result;
        }
    }