Pregunta de entrevista de peopleHum

Rotating array coding question to solve