Question d’entretien chez Gentex Corporation

Write a function to reverse a singly linked list.