Pergunta de entrevista da empresa Amelia

Was asked to reverse a list and explain logic