02.04 · Problem
Container With Most Water
This problem is part of solulu Pro
You're given n vertical lines; line i stands at x = i with height height[i]. Pick two lines that, together with the x-axis, form a container. The water it holds is min(height[i], height[j]) × (j − i). Return the maximum…
Lifetime ₹1,999 ₹999 · Launch offer
Item 13 of 150 · updated 2026-10-12