Domanda di colloquio di Hulu

how to reverse a linked list?

Risposta di colloquio

Anonimo

21 gen 2011

Traverse the list in reverse order (starting from the end). Create a new list and add the objects sequentially. Voila, the list is now reversed.