Question d’entretien chez Amazon

Write a function to reverse a linked list.