Class PriorityQueue<T>
A priority queue implementation using heap
Inheritance
PriorityQueue<T>
Assembly: Advanced.Algorithms.dll
Syntax
public class PriorityQueue<T> : IEnumerable<T>, IEnumerable where T : IComparable
Type Parameters
Constructors
|
Improve this Doc
View Source
PriorityQueue(SortDirection)
Declaration
public PriorityQueue(SortDirection sortDirection = SortDirection.Ascending)
Parameters
Methods
|
Improve this Doc
View Source
Dequeue()
Time complexity:O(log(n)).
Declaration
Returns
|
Improve this Doc
View Source
Enqueue(T)
Time complexity:O(log(n)).
Declaration
public void Enqueue(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
|
Improve this Doc
View Source
Peek()
Declaration
Returns
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements