Container With Most Water
MediumTwo Pointers
The problem
Given vertical line heights, find two lines that hold the most water with the x-axis.
Full statement, examples and constraints: see the original problem link below.
Given vertical line heights, find two lines that hold the most water with the x-axis.
Full statement, examples and constraints: see the original problem link below.