Nagarro interview question

Rotate an array n times.