public class Solution { /** * * @param arr int整型一维数组 the array * @return int整型 */ public int maxLength (int[] arr) { // write code here int i = 0; int j = 0; int maxlen = 0; int[] map = new int[100000]; Arrays.fill(map,-1); while(j<arr.length){ if(map[arr[j]]==-1){ map[arr[j]] = j; maxlen=Math.ma...