COMP 2140 Lecture 10: 10_08_queue_table.pdf

59 views31 pages

Document Summary

Similar to array-based implementation for lists and stacks, the queue size is fixed. You cannot enqueue new items once the array is full, unless you create a new array. We can also use a circularly-linked list to implement a queue. Similar to stacks, you must pull contents out of queue to view them. Examining each element exactly once: need to keep track of queue size. Example: reverse the order of the elements of a queue. The limitations of stacks/queues often tell other people how your algorithm works. Users of the adt do not have to worry about implementation details. It gives you the freedom to change your implementation without affecting your users. Table: a collection of entries, which each entry contains a key: a unique identifier for the entry rest of the entry: other data (attributes) associated with this entry.

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