Amelia interview question

Was asked to reverse a list and explain logic