Back to Question

How do you find the container with the most water in an array?

Question Explain

Given n vertical lines, this problem asks to find two lines that together with the x-axis form a container holding the most water. It tests the two-pointer technique.

Start Trying This Question Simulation