Summary: Priority Queues Page 1
Want to delete from queue according to priority.
o Max priority queue delete the greatest.
o Min priority queue delete the least.
Insert normally, but delete based on priority.
We can implement priority queues using binary search trees, ordered or unordered lists, ordered or
unordered arrays, etc.
Let assume a linked list implementation.
Insert )1( .
Delete )(n .
Insert )(n .
Delete )1( .
What if we used a BST? What would happen with successive deletes?
A splay tree? What would happen with successive deletes? Is there a way of getting the good run
time without having to have the expense of pointers?