You’re given an integer array height of length n, and there are n vertical lines drawn such that the two endpoints of the ith line are (i,0) and (i, height[i]).
Find two lines from the input array ...
⋮
Tap here to switch tabs
Problem
Ask
Submissions
Solution
Solution: Container with Most Water
Statement▼
You’re given an integer array height of length n, and there are n vertical lines drawn such that the two endpoints of the ith line are (i,0) and (i, height[i]).