@@ -0,0 +1,1189 @@
+package leetcode.container_with_most_water;%0A%0Aimport java.util.Random;%0A%0Apublic class Solution %7B%0A%09%0A    public int maxArea(int%5B%5D height) %7B%0A        if(height == null %7C%7C height.length %3C= 1) return 0;%0A        int n = height.length;%0A        int left = 0, right = n - 1;%0A        int max = 0;%0A        while(left %3C right)%7B%0A        %09int area = (right - left) * Math.min(height%5Bright%5D, height%5Bleft%5D);%0A        %09if(area %3E max)%7B%0A        %09%09max = area;%0A        %09%7D%0A        %09if(height%5Bright%5D %3E height%5Bleft%5D)%7B%0A        %09%09left++;%0A        %09%7Delse%7B%0A        %09%09right--;%0A        %09%7D%0A        %7D%0A        return max;%0A    %7D%0A    %0A    public static void main(String%5B%5D args)%7B%0A    %09final int N = 10;%0A    %09final int bound = 100;%0A    %09Random r = new Random();%0A    %09int%5B%5D input = new int%5BN%5D;%0A    %09for(int i = 0; i %3C N; i++)%7B%0A    %09%09input%5Bi%5D = r.nextInt(bound);%0A    %09%09System.err.print(input%5Bi%5D + %22 %22);%0A    %09%7D%0A    %09System.err.println(%22%22);%0A    %09int max = 0;%0A    %09for(int i = 0; i %3C N; i++)%7B%0A    %09%09for(int j = 0; j %3C i; j++)%7B%0A    %09%09%09int area = (i - j) * Math.min(input%5Bi%5D, input%5Bj%5D);%0A    %09%09%09if(area %3E max)%0A    %09%09%09%09max = area;%0A    %09%09%7D%0A    %09%7D%0A    %09System.err.println(new Solution().maxArea(input));%0A    %09System.err.println(max);%0A    %7D%0A%7D%0A

Add java solution for 11. Container With Most Water