Nitish Verma interview question

Rotate the array into the end