You are given an array height of n non-negative integers, where each value is the height of a vertical line drawn at that x-position. Pick two lines that, together with the x-axis, form a container holding the most water, and return that maximum area.
The area between lines i and j is min(height[i], height[j]) × (j − i). The container cannot be tilted.
[1,8,6,2,5,4,8,3,7][1,1][4,3,2,1,4][1,2,1][2,3,4,5,18,17,6][0,0]