Summary
A
doubly_linked_list is a sequence of nodes. Each
node stores data plus
prev and
next links. It supports
bidirectional_traversal. Common references are
head and
tail. Insert or remove at ends is efficient. Deleting a known node updates two links. Random access requires traversal. It is used in a
deque and an
lru_cache. Extra memory is needed for the second pointer. Typical pitfalls include broken links and orphan nodes.