Reading material

Pages 166-173 (Section 4.4)

Additional material

Implementation of a deque with a doubly linked list in pseudocode: PostScript and PDF

Deque
DequeEmptyException
DLNode
LinkedDeque
DequeStack

Question

Write a method that reverses a linked list.
/**
   Reverses a linked list.

   @param node First node of the linked list to be reversed.
   @return First node of the reversed list.
*/
public static Node reverse(Node node)