Question d’entretien chez Amazon

Reverse a singly linked list

Réponse à la question d'entretien

Utilisateur anonyme

13 janv. 2012

Traverse the list once to find a pointer to the tail node. Traverse the list again and insert the current node directly after the tail node you originally found. Stop when you reach the tail node. Then, set the tail to the head.