data-structures

Priority Queue in Python

Priority queue is a data structure similar to a regular queue, but where elements have priorities assigned. Python comes with a built-in PriorityQueue class contained in the queue module.