### Some Basics

#### Priority Queues

- A
is a data structure for maintaining a set*priority queue**S*of elements, each with an associated value called a*key*. - A
*min-priority queue**INSERT(S, x)**x*into the set*S*. This operation could be written as*S*=*S*∪ {*x*}.returns the element of*MINIMUM(S)**S*with the smallest key.removes and returns the element of*EXTRACT-MIN(S)**S*with the smallest key.decreases the value of element*DECREASE-KEY(S, x, k)**x*’s key to the new value*k*, which is assumed to be at least as small as*x*’s current key

Pages:Contents … << Previous **3** Next Page >>

## One Comment Add yours