← 返回 apple 的题目列表Container With Most Water
类型:qbank
You are given an integer array heights where heights[i] represents the height of the ithi^{th}ith bar.
Examples
Example 1:
Input: height = [1,7,2,5,4,7,3,6]
Output: 36
Example 2:
Input: height = [2,2,2]
Output: 4
Constraints
2 <= height.length <= 1000
0 <= height[i] <= 1000