Doubly Linked List
noun
say it: “DUB-lee LINKT LIST” /ˈdʌbli lɪŋkt lɪst/
A linked list whose nodes point to both the next node and the previous one.
What is a doubly linked list?
A doubly linked list gives each node two references: next and prev (previous). It can be walked forward from the head or backward from the tail, and the last node can be removed in O(1), because the node before it is one step away. A music player's previous and next buttons are a doubly linked list. The price is one more reference to store, and keep right, in every node.
In a sentence
- “The player's previous and next buttons walk a doubly linked list of songs.”
Level: Journeyman · More Data Structures terms at this level
Updated