COMP 2140 Lecture 10: 10_08_queue_table.pdf
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.