Solution: Container with Most Water
Let's solve the Container with Most Water problem using the Two Pointers pattern.
Statement
You’re given an integer array height
of length , and there are vertical lines drawn such that the two endpoints of the line are and (, height[i]
).
Find two lines from the input array ...