Pergunta de entrevista da empresa IBM

1st code - based on array rotation