import java.util.*; public class Solution { /** * max sum of the subarray * @param arr int整型一维数组 the array * @return int整型 */ public int maxsumofSubarray (int[] arr) { // write code here int pre = 0, maxres = 0; for(int x : arr) { pre = Math.max(pre + x , x); maxres = Math.max(pre,maxres); } return ...