AlgoPlus//structures / fibonacci-heap
Read the theory

Fibonacci Heap

Lazy inserts into a flat root list; the work is deferred to extract-min's consolidation.

Phase
Roots
Min
Insert sequence
Legend
Node
Minimum
Consolidating
AI Tutor Workspace
In a nutshell
A Fibonacci heap is a priority queue that wins by procrastinating. Adding an item just drops it into a flat list of tree roots and updates a pointer to the minimum — instant, with no tidying. All the real reorganizing is deferred until you remove the minimum, which finally consolidates trees whose roots have the same number of children, in one batch. Spread over many operations, this laziness makes insert and lowering a key cost only O(1) amortized (averaged) time — which is why it speeds up shortest-path algorithms like Dijkstra's.
Ready
Press play to begin the cinematic walkthrough.
Be lazy: tossing a node into the root list is O(1). Don't tidy up until extract-min forces it — then consolidate equal-degree trees all at once.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Fibonacci Heap.