Rotate array by n elements. Sort names based on last name.
Utilisateur anonyme
Rotating the array by N elements - there is a nice trick to do this in place: - invert the entire array - invert first N items (or last, depending if rotating right or left) - invert rest of the array I found this trick initially to rotate strings, but can be used for arrays as well.