Question d’entretien chez FactSet

Write code to reverse a linked list.