Juniper Networks Interview Question

Write a library for implementing a priority queue.