Represents a Queue in which the elements are ordered using a specified priority.
PriorityQueue()
Initializes a new instance of PriorityQueue which is empty and ordered by ascending priority value (higher priority first).
PriorityQueue(PriorityQueueOrder order)
Initializes a new instance of PriorityQueue which is empty and ordered by ascending or descending priority value.
PriorityQueue(int capacity, PriorityQueueOrder order)
Initializes a new instance of PriorityQueue which is ordered by ascending or descending priority value and has the specified initial capacity.
int Count
Gets the number of elements contained in the PriorityQueue.
bool IsEmpty
Determines whether the PriorityQueue is empty.
void Push(T value, int priority)
Inserts a new item into the PriorityQueue, in a position relative to the given priority. Complexity: O(LogN)
PriorityQueueNode<T> Pop()
Removes the element with the highest (or lowest) priority from the PriorityQueue and returns its value. Complexity: O(LogN)
PriorityQueueNode<T> Peek()
Returns the PriorityQueueNode with the highest (or lowest) priority in the PriorityQueue wihout removing it. Complexity: O(1)