Professional Documents
Culture Documents
DSTR Topic09 Queues
DSTR Topic09 Queues
5
Topic 09: Queues AY2022/23 S1
The Queue ADT
6
Topic 09: Queues AY2022/23 S1
Abstract View of the Queue
Abstract Physical
View View
14
Topic 09: Queues AY2022/23 S1
Circular Array
Advantage:
Allows us to add new items to a queue and
remove existing ones without having to
shift items in the process.
Disadvantage:
Concept of a maximum-capacity queue
that can become full.
15
Topic 09: Queues AY2022/23 S1
Queue Implementation (with a
Circular Array)
Implementation Details:
count number of items in the queue
front array element containing the first item
back array element containing the last item