AlgoScope

Fibonacci Heap Decrease-Key

AlgorithmexpertHeap Operations

Cut the node to the root list; cascading cuts keep the potential bounded.

Decision · step 2 of 4Binomial and Fibonacci Heaps: Decrease-key: one cut
heap239×15301952

41 becomes 9. Its parent is 23, which is now larger: heap order is broken between exactly these two nodes, so 9 is cut and joins the root list, and the parent takes a mark.

Open in the player →or start at step 2

What you will see

A node detaches and joins the root list; marked ancestors cascade.

How binomial and fibonacci heaps works →

Cost

BestO(1)
AverageO(1) amortized
WorstO(log n)
SpaceO(1)

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next, try operations in any order.

Screen readers: Nodes announce value, parent and children; each step announces the comparison and whether the value moves up or down.

Reduced motion: Swaps become value crossfades in both the tree and the array view.

Before this

Taught by the same lesson

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