You are given a maxHeights of length
Your task is to construct an array heights of length
heights[i] maxHeights[i] for all
heights forms a mountain array, meaning there exists an index
heights[j] heights[j + 1] for all
heights[k] heights[k + 1] for all
Return the maximum possible sum of elements in heights for any valid configuration.
Constraints:
maxHeights.length
maxHeights[i]
You are given a maxHeights of length
Your task is to construct an array heights of length
heights[i] maxHeights[i] for all
heights forms a mountain array, meaning there exists an index
heights[j] heights[j + 1] for all
heights[k] heights[k + 1] for all
Return the maximum possible sum of elements in heights for any valid configuration.
Constraints:
maxHeights.length
maxHeights[i]