History Log

Help Information

This demo is designed to show and help you understand operations with a Fibonacci heap. A Fibonacci heap is a collection of heaps that are linked together. The heap property requires each parent node to be no greater than any of its child nodes.

Insert - O(1)

Add a new tree with one element.

PopMin - Amortized O(log N)

Remove the root of the min tree, add all its children to the root list, and consolidate the trees.

Decrease Key - Amortized O(1)

If an element becomes less than its parent, move it to the root list.

Remove Element - Amortized O(log N)

Remove an element by moving it to the root list and then performing a pop min operation.

Union Fibonacci Heaps - O(1)

Join the root lists of two Fibonacci heaps.

Legend:

Root node

Min element which is also a root node

Non-root node

Parent-child link

Weak parent-child link