AlgoPlus//structures / binomial-heap
Read the theory

Binomial Heap

A forest of distinct-order binomial trees — inserts carry like binary addition.

Phase
Trees
Min
Insert sequence
Legend
Node
Minimum root
Linking
AI Tutor Workspace
In a nutshell
A binomial heap is a priority queue built so that merging two heaps is cheap. It is a forest of small trees whose sizes are all distinct powers of two — 1, 2, 4, 8 — mirroring the binary digits of the item count. Inserting adds a single-node tree and then 'carries': whenever two trees are the same size, the one with the larger root is hung under the other, rolling up to the next size, exactly like adding 1 in binary. Because the trees stay small and few, insert, union, and removing the minimum all run in O(log n).
Ready
Press play to begin the cinematic walkthrough.
Keep one tree per 'power of two', just like binary digits. Inserting flips the lowest bit and carries: equal-order trees link and roll up to the next order.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Binomial Heap.