1 5 7 9 11 13 1 5 7 9 11 13 13 5 7 9 11 1 First element Swapping Swapping Second element New array, after swapping first and last elements w3resource.com