Amazon Interview Question

Coding task: rotate an integer array by given offset.