class Solution {
    public int maxArea(int[] height) {
        int l = 0;
        int r = height.length - 1;
        int ans = 0;
        while (l < r) {
            int h = Math.min(height[l], height[r]);
            ans = Math.max(ans, h * (r - l));
            if (height[l] < height[r]) {
                ++l;
            } else {
                --r;
            }
        }
        return ans;
    }
}

@@ -1,8 +1,70 @@
+/*%0ATwo pointers%0ATime complexity:O(n)%0ASpace complexity:O(1)%0A*/%0A
 class So

refresh ContainerWithMostWater.java