Given n non-negative integers representing heights, find two lines that together with the x-axis form a container that holds the most water.
Input: height = [1,8,6,2,5,4,8,3,7] Output: 49 Input: height = [1,1] Output: 1
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features