Enter array of nums:


Swap the first and last elements of a given array of integers. The array length should be at least 1