For the vector: 6 7 8 9 10 1 2 3 4 5 Swaping the first five elements with the last five gives: 1 2 3 4 5 6 7 8 9 10 Swaping the first and last elements gives: 10 2 3 4 5 6 7 8 9 1