Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Priority Queues Page 1 Priority Queues
 

Summary: Priority Queues Page 1
Chapter 6
Priority Queues
Introduction
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.
o Unordered
Insert ­ )1( .
Delete ­ )(n .
o Ordered
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?

  

Source: Allan, Vicki H. - Department of Computer Science, Utah State University

 

Collections: Computer Technologies and Information Sciences