Class Kata "Priority Queue"
Write a class that implements a queue in which the elements are assigned a priority. Elements with a higher priority always come before elements with a lower priority. Elements with the same priority are placed in the queue in the order in which they are received.
The class interface should look like this:
class PriorityQueue { void Enqueue(T element, int priority) {...} T Dequeue() {...} int Count() {...} // Number of elements in the queue }
Example: