Overview
Pairing Heap is a data structure that maintains an invariant that supports efficient queries, updates, summaries, or indexing. It trades implementation complexity for faster or more compact operations on repeated workloads.
Pairing Heap organizes data around a query, update, ordering, or approximation invariant.
Compact metadata for implementation and discovery.
Pairing Heap is a data structure that maintains an invariant that supports efficient queries, updates, summaries, or indexing. It trades implementation complexity for faster or more compact operations on repeated workloads.
Quick facts
Runtime and memory behavior at a glance.
Best
O(1)
Average
O(log n)
Worst
O(n)
Space
O(n)
Show the structure changing as items are inserted, queried, or removed.
Pairing Heap operates in O(log n) time and O(n) space within the Data Structure family. Often compared with Heap and Priority Queue.
What each reference supports for this entry.
Data-structures reference for pairing heap meld operations, two-pass pairing, and amortized priority-queue behavior.
Original reference for pairing heaps, meldable priority-queue operations, and two-pass heap linking behavior.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Data Structures · Foundation
Pairing heaps are heap variants that represent meldable priority queues with self-adjusting tree linking.
Compare with thisData Structures · Core
Pairing heaps are another pointer-based mergeable heap design.
Compare with thisPairing heaps are heap variants that represent meldable priority queues with self-adjusting tree linking.
Pairing heaps are practical alternatives to Fibonacci heaps, trading weaker guarantees for simpler meld operations.