Given an array of ints, swap the first and last elements in the array. Return the modified array. The array length will be at least 1. swapEnds([1, 2, 3, 4]) → [4 ...
/*Given a number n, create and return a new int array of length n, containing the numbers 0, 1, 2, ... n-1. * The given n may be 0, in which case just return a length 0 array. You do not need a ...