Priority Queues A stack, a queue, and a heap are examples of data structures called priority queues. The items of a PQ are always unfulfilled obligations. A priority queue PQ must have the following operators: Initialize PQ to be empty. Test to see whether PQ is empty. Insert an arbitrary item into PQ. Delete the priority item from PQ. In a stack, the priority item is the most recently inserted item. In a queue, the priority item is the least recently inserted item. In a heap, the priority item is the item with the minimum (or maximum) key. The key could be anything. The Bill Payer. You get bills in the mail from time to time, and you have to pay them. But you don't pay bills the moment you receive them: instead, you place them on your desk, where they are unfulfilled obligations. When you decide to pay a bill, you take one from your desk and pay it. The stack strategy: When you get a bill, you place it on the top of your pile of bills. When you decide to pay a bill, you pay the one on top, i.e., the one you got most recently. The queue strategy: The bill you pay is the one that's been on your desk the longest. One way to do this is to insert every new bill at the bottom (rear) of the pile, and take from the top (front) of the pile. The heap strategy: Every bill has a due date. When you decide to pay, you pay the bill that has the earliest due date. How would you implement this in practice?