public static int peek(int n,int[] nums) { int[] left = new int[n]; int[] right = new int[n]; int[] t = Arrays.copyOf(nums,n); int ans = Integer.MAX_VALUE; for (int i = 1; i < n; i++){ if (nums[i - 1] + 1 > nums[i]){ left[...