Class PairingMaxHeap<T>
A pairing max heap implementation.
Inheritance
PairingMaxHeap<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class PairingMaxHeap<T> : IEnumerable<T> where T : IComparable
Type Parameters
Properties
Count
Declaration
public int Count { get; }
Property Value
Methods
Time complexity: O(log(n)).
Declaration
Returns
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type |
Description |
IEnumerator<T> |
|
IncrementKey(T, T)
Time complexity: O(log(n)).
Declaration
public void IncrementKey(T currentValue, T newValue)
Parameters
Type |
Name |
Description |
T |
currentValue |
|
T |
newValue |
|
Insert(T)
Insert a new Node.
Time complexity: O(1).
Declaration
public void Insert(T newItem)
Parameters
Type |
Name |
Description |
T |
newItem |
|
Merge(PairingMaxHeap<T>)
Merge another heap with this heap.
Time complexity: O(1).
Declaration
public void Merge(PairingMaxHeap<T> PairingHeap)
Parameters
PeekMax()
Declaration
Returns