Add an element to a queue based on its priority. If the priority is invalid ValueError is raised. If the queue is full an OverFlowError is raised.
A priority queue is a special type of queue in which every element is assigned a priority. Unlike a simple queue, elements in a priority queue are removed according to priority, not according to the ...