Question d’entretien chez Amazon

Coding task: rotate an integer array by given offset.