Priority Queue
Intrinsic ordering of the elements does determine the results of its basic operations.
A priority Queue may be
- Ascending - items are entered arbitrarily & only the smallest item may be removed.
- Descending - items are entered arbitrarily & only the largest item may be removed.
How do we implement insert and delete
Remember that members of a queue need not be numbers or characters which can be compared directly.