AlgoScope

Binomial Heap Merge

Merge two heaps by linking trees of equal degree like binary addition.

Heap algorithms, algorithm, expert
Degree 0: 2 trees.heap301045205512358

Binomial and Fibonacci Heaps: Merge two binomial heaps

Decision, step 2 of 9

Degree 0: 2 trees, rooted at 55, 8. Two of a kind: link them, and the result is a B1 that joins the next degree.

How binomial and fibonacci heaps works

Cost

Best
O(log n)
Average
O(log n)
Worst
O(log n)
Space
O(1)

Taught by the same lesson

Binomial and Fibonacci Heaps covers these too, in the same run.