[prev] 66 [next]

Doubly-linked Lists

Doubly-linked lists are a variation on "standard" linked lists where each node has a pointer to the previous node as well as a pointer to the next node.

[Diagram:Pic/linked-list-types.png]

  • As shown in the diagram, the above doubly-linked list also has a notion of a "current" node, and current can move backwards and forwards along the list.
  • The doubly-linked list does insertions either immediately before or immediately after the current node.
  • Deletion always causes the current node to be removed from the list.

You can find one possible implementation of the above doubly-linked list ADT in the directory "dllist", under "Programs" for this lecture.

.