Queues, Continued
- Let's modify Monday's code so that the array
can grow as necessary
- Let's modify Monday's code so that first provides
the index of the next item in the queue to be removed
and last provides the index of the last item in the
queue
- What other improvements can we make to Monday's code?
Lecture Code
Priority Queues
- A priority queue is a queue where each item has a
priority associated with it.
- Items with a higher priority get removed before items
with a lower priority.
- Items with the same priority are removed according to
the standard queue FIFO principle.