CP114 Lecture Notes - Lecture 1: Priority Queue, Triage, Railways Act 1921

57 views3 pages
School
Course
Professor

Document Summary

Data structure: is a group of related data items. Organizes data in a program lists and tuples are simple python data structures. Packages a collection of entities and controls on how to use entities a program is modular if it is dived into well-designed modules (ex functions and main program) Also, making program as generic as possible. Hiding the internal mechanics of a module. This is to prote(cid:272)t private info (cid:272)an"t (cid:271)e a(cid:272)(cid:272)essed or modified. Grouping of data entity and its associated methods together in a module. A data entity plus a set of methods on that entity. Items are removed from priory queue in order of their priority (highest to lowest) New items can be added at any time. Items of equal priority are removed in order of their addition (first come first serve) Determine number of items in a priority queue. Check if queue is empty or not. Determine the item with highest priority without removing them.

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