CloudNow interview question

Rotate the array K times