import java.util.*; public class Solution { /** * max water * @param arr int整型一维数组 the array * @return long长整型 */ public long maxWater (int[] arr) { // write code here if (arr == null || arr.length < 3) { return 0; } int left = 0, right = arr.length - 1; long maxLeft = 0, maxRight = 0, ans = 0; /...