Back to Questions

Container With Most Water

130.6K viewsAsked at Apple
Medium

Question Explain

Given $n$ non-negative integers representing an elevation map. Find two lines that together with the x-axis form a container, such that the container contains the most water. Use the Two-Pointer technique.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Container With Most Water - Interview Question