Container With Most Water

You are given an array of non-negative integers height, where each value represents the height of a vertical line drawn at that index on the x-axis.

Choose any two different lines so they, together with the x-axis, form a container. The container can hold water up to the height of the shorter line, and its width is the distance between the two indices.

Return the largest amount of water any such container can hold.

Examples
Input: [1,8,6,2,5,4,8,3,7]
Output: 49
Hints
Related Problems

Container With Most Water

You are given an array of non-negative integers `height`, where each value represents the height of a vertical line drawn at that index on the x-axis.