next up previous
Next: Up: Previous:

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})


next up previous
Next: Up: Previous: