You are given an integer array height of length n representing n vertical lines drawn such that the two endpoints of the i-th line are (i, 0) and (i, height[i]). The task is to find two lines that together with the x-axis form a container that can hold the maximum amount of water. The container cannot be slanted.
Click Run to execute sample tests.