Microsoft interview question

Shift array by K without extra memory usage