11. Container With Most Water
# Medium
Solution
Keep maxium area in record.
Move left or right pointer each time by finding the longest two lines.
简单来说,有两种可能性能找到最大值,第一种距离尽量最远的两个垂线,第二种高度尽量最高的两条垂线。
Last updated
Was this helpful?
# Medium
Keep maxium area in record.
Move left or right pointer each time by finding the longest two lines.
简单来说,有两种可能性能找到最大值,第一种距离尽量最远的两个垂线,第二种高度尽量最高的两条垂线。
Last updated
Was this helpful?
Time complexity = , space complexity =