loading

Container With Most Water — Step-by-Step Visualization

mediumLeetCode #11ArrayTwo PointersGreedy

Given heights of n vertical lines, find two lines that form a container holding the most water. Use two pointers — always move the shorter side inward.

Related Problems