Reading material

Pages 166-173 (Section 4.4), pages 184-186 (Section 5.1.1)

Additional material

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

Deque
DequeEmptyException
DLNode
LinkedDeque
DequeStack
InspectableContainer
InspectableVector
Vector

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)