Skip to main content

Heap Variants

Heap-Based Data Structures

TypeDescriptionKey CharacteristicTypical Use CaseAccess PatternMemory BehaviorNotes
HeapPriority-based treeHeap propertyPriority queuesRoot accessTree-basedGeneral concept
Binary HeapBinary tree heapArray-backedSchedulersLogarithmicContiguousMost common
Min-Max HeapSupports min and maxAlternating levelsDouble-ended PQLogarithmicContiguousMin & max in O(1)
D-ary HeapEach node has d childrenShallower treeHigh branchingLogarithmicContiguousFewer comparisons
Ternary Heap3-ary heapReduced heightPriority queuesLogarithmicContiguousD-ary variant
B-HeapMemory-efficient heapBlock-based layoutCache optimizationLogarithmicSemi-contiguousImproves locality
Weak HeapRelaxed heapFewer comparisonsSortingLogarithmicContiguousEfficient heap sort
Binomial HeapForest of treesFast mergeMeldable PQsLogarithmicNode-basedSupports union
Fibonacci HeapLazy consolidationAmortized O(1) insertGraph algorithmsAmortized logNode-basedComplex but powerful
AF-HeapFibonacci variantSimpler structureResearchAmortized logNode-basedLess overhead
Leonardo HeapUsed in smoothsortAdaptive sortingSorting algorithmsLogarithmicContiguousData-order sensitive
2–3 HeapHeap with 2–3 nodesBalanced heapTheoretical modelsLogarithmicNode-basedRarely used
Soft HeapAllows errorsApproximate keysApprox algorithmsAmortized logNode-basedControlled corruption
Pairing HeapSelf-adjusting heapSimple meldPriority queuesAmortized logNode-basedPractical alternative
Leftist HeapSkewed structureFast mergeMeldable heapsLogarithmicNode-basedLeft-heavy
Skew HeapSelf-adjustingNo balance infoMeld-heavy systemsAmortized logNode-basedSimpler than leftist
TreapHeap + BSTRandomized priorityOrdered setsExpected logNode-basedDual properties
BeapBi-parental heapEfficient searchPriority searchLogarithmicContiguous2D structure
Brodal QueueOptimal PQWorst-case optimalTheoretical CSO(1) opsNode-basedExtremely complex