Given an integer array height of n non-negative integers, where each value represents the height of a vertical line drawn at position i, find two lines that together with the x-axis form a container that holds the most water.
Return the maximum amount of water that container can store.
Note: You may not slant the container.
Input: height = [1, 8, 6, 2, 5, 4, 8, 3, 7] Output: 49 Explanation: Lines at index 1 (height 8) and index 8 (height 7) form a container with area min(8,7) * (8-1) = 7 * 7 = 49.
Input: height = [1, 1] Output: 1 Explanation: The only two lines form a container of area min(1,1) * 1 = 1.
2 <= height.length <= 10^50 <= height[i] <= 10^4height = [1, 8, 6, 2, 5, 4, 8, 3, 7]