Realizing A Priority Queue Using Heaps