Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 11. Container With Most Water
Given heights of vertical lines at unit-spaced x-coordinates, pick two indices i<j to maximize the area min(height[i],height[j])*(j-i). With n up to 1e5, the problem requires a linear-time two-pointer/greedy approach instead of brute-force O(n^2).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.