Question d’entretien chez Rica Tech

What is the logic to reverse the array