@@ -0,0 +1,791 @@
+// Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.%0A%0A// Note: You may not slant the container.%0A%0Apublic class Solution %7B%0A    public int maxArea(int%5B%5D height) %7B%0A%09%09int len = height.length;%0A%0A%09%09if(len == 0) return len;%0A%0A%09%09int max = 0;%0A%0A%09%09int left = 0;%0A%09%09int right = len - 1;%0A%0A%09%09while(left %3C right)%7B%0A%09%09%09int area = height%5Bleft%5D %3C height%5Bright%5D? height%5Bleft%5D * (right - left) : height%5Bright%5D * (right - left);%0A%09%09%09max = max %3E area? max : area;%0A%09%09%09if(height%5Bleft%5D %3C height%5Bright%5D)%7B%0A%09%09%09%09left++;%0A%09%09%09%7Delse%7B%0A%09%09%09%09right--;%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09return max;%0A    %7D%0A%7D

add container with most water solution