AI engineering glossary · Data structures algorithms
What is doubly linked list?
Doubly linked list: A linked list where every node points to both its next and previous node. This allows walking in either direction and removing a node in constant time when you already hold a reference to it.
Doubly linked list: an example
An LRU cache keeps its entries in a doubly linked list so a used entry can be unlinked and moved to the front in O(1).
Related terms
More Data structures algorithms terms
- Dynamic array
- Dynamic programming
- Edit distance
- Fenwick tree
- Floyd-Warshall algorithm
- Graph
- Greedy algorithm
- Hash table
Where you learn it
Doubly linked list is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.