Deqode Interview Question

Rotate a given array by n index.