Pointers in both directions
A doubly linked list extends the singly linked list by giving every node two references: one to the next node and one to the previous node. The list usually keeps both a head and a tail pointer. This small addition unlocks backward traversal and much easier deletion.
Removing a node without searching
In a singly linked list, deleting a node requires knowing the one before it, so you often search for the predecessor. With previous pointers, a node already knows its neighbor on both sides. To remove it you simply:
- Link its previous node directly to its next node.
- Link its next node back to its previous node.
That splice happens in constant time given a reference to the node itself.
The cost of the extra link
Nothing is free. Each node now stores an additional pointer, raising memory use, and every insertion or deletion must update more references, so the bookkeeping is more error prone. Many implementations use a sentinel dummy node to avoid special cases at the ends.
Key idea
A doubly linked list adds a previous pointer to each node, enabling backward traversal and constant time deletion of a known node at the price of more memory and bookkeeping.