- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Variations of Pairing Heaps
A pairing heap can be either an empty heap, or a pairing tree containing of a root element and a possibly empty list of pairing trees.
The heap ordering property needs that parent of any node is no greater than the node itself.
The following description considers a purely functional heap that does not support the decrease-key operation.
type PairingTree[Element] = Heap(element: Element, subheaps: List[PairingTree[Element]])
type PairingHeap[Element] = Empty | PairingTree[Element]
Pairing heaps exist in two varieties--min pairing heaps and max pairing heaps. Min pairing heaps are implemented when we wish to represent a min priority queue, and max pairing heaps are implemented for max priority queues. As per our discussion of heaps and leftist trees in the text, we explicitly discuss max pairing heaps here. Min pairing heaps can be analogous.
A max pairing heap is defined as simply a max tree.
Four max pairing heaps are shown below. Notice that a pairing heap does not require being a binary tree.
- Pairing Heaps
- Adaptive Properties of Pairing Heaps
- What are the Variations of DES?
- Friend Pairing Problem
- Soft Heaps
- Min-Max Heaps
- What are different variations of for loop iterations?
- Friends Pairing Problem in C++
- Symmetric Min-Max Heaps
- Binomial Heaps in Data Structure
- Fibonacci Heaps in Data Structure
- Interval Heaps in Data Structure
- Compare and analyze any two major variations of message passing systems
- Consecutive elements pairing in list in Python
- Python – Cross Pairing in Tuple List