medium Two Pointers
Container With Most Water
Vertical lines have heights `height`. Pick two lines that, with the x-axis, hold the most water: area = min(height[i], height[j]) × (j - i). Return that maximum area. Example: [1, 8, 6, 2, 5, 4, 8, 3, 7] → 49.
runs in your browser