CSCA48H3 Lecture Notes - Lecture 4: Priority Queue, Bracket, Init

57 views6 pages

Document Summary

A queue whereby every entry in the queue also has a priority. The remove operation removes an entry from the queue; entries are removed from the queue from highest (most important) priority to lowest (least important) priority. The priority is a positive integer, and the smaller the number is, the higher the priority (sometimes a priority queue is implemented whereby the larger the number, the higher the priority) There are several applications of the priority queue, such as the following: Generating the adt definition of a priority queue. The data which the priority queue contains is a sequence of arbitrary objects/elements. Also can be defined as a collection of objects, where each object has an associated priority. The priority could be a positive integer, and smaller number is considered higher priority. The priority queue also performs several operations insert(o, p): Add an object o with priority p to the priority queue. Remove and return the item with the highest priority.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents