Pergunta de entrevista da empresa peopleHum

Rotating array coding question to solve