You are given an array height where the i-th element is the height of a vertical line at position i. Choose two lines that, together with the x-axis, form a container holding the most water. Return the maximum amount of water.
Input: one line of space-separated integers height.
Output: the maximum area.
1 8 6 2 5 4 8 3 7
49
Lines at indices 1 and 8: min(8,7) × 7 = 49.
1 1
1
Run your code against the sample tests, or Submit to run the full suite.