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.

Level: intermediateTopic: Data structures algorithms

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.