public class Solution { public static long maxWater (int[] arr) { if(arr.length <= 2){//先判断是否可以容纳水滴 return 0; } int sum = 0; int start = 0,end = arr.length - 1; while(start < end){//总的边界条件 int i = 0; int temp = 0; ...