Python's heapq module: Implementing heap queue algorithm

Python's heapq module: Implementing heap queue algorithm