Amazon interview question

Reverse a linked list.

Interview Answer

Anonymous

9 Feb 2011

If its a Doubly Liked List, then i think easy way is to swap the element data from last node to head node.