next up previous
Next: Application: Job Scheduling Up: CSE 2320: Algorithms and Previous: Summary

Priority Queues

A priority queue is a data structure for maintaining a set S of elements, each with an associated key value.



Operations:

Max(S):
returns element of S with largest key



ExtractMax(S):
removes and returns element with largest key from S



Insert(S,x):
inserts x into S (S = S $\cup$ {x})



Copyright © 1998 The University of Texas at Arlington