Juniper Networks interview question

Write a library for implementing a priority queue.