Back to marketplace

Chapter 34 - Queues

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

How is an abstract data type created?

Back (Answer)

» Data type that is created by the programmer, rather than defined within the programming language

#2
Front (Question)

What are some examples of structures contained in abstract data types?

Back (Answer)

» Queues » Stacks » Trees » Graphs

#3
Front (Question)

What is an abstract data type?

Back (Answer)

» Logical description of how the data is viewed and the operations that can be performed on it

#4
Front (Question)

What is one good example of data abstraction?

Back (Answer)

» Where its up to the programmer to decide how to construct the data structure » This encapsulates around the data, hiding the details of implementation from the user

#5
Front (Question)

What is a queue?

Back (Answer)

» A first in First out (FIFO) data structure

#6
Front (Question)

Where are elements added in a queue?

Back (Answer)

» At the end of a queue

#7
Front (Question)

Where are elements retrieved from?

Back (Answer)

» From the front of a queue

#8
Front (Question)

What does the sequence of data items in a queue is determined by?

Back (Answer)

» By the order they are inserted in

#9
Front (Question)

What is an example of how a queue is in real life?

Back (Answer)

» Imagine people printing out work to be printed at more or less the same time » By putting the output into a queue on disk, the output is printed on a first come first served basis

#10
Front (Question)

What is a queue described as?

Back (Answer)

» An ordered collection of items which are added at the rear of the queue, and remove front the front

#11
Front (Question)

What happens if the first person in the queue leaves?

Back (Answer)

» The front pointer is made to the next point, the elements do not move, when a new person joins the queue, the rear pointer moves to the last item » Think of a queue, in a doctor’s surgery, people leave and join the queue, but no one moves chairs

#12
Front (Question)

What does enQueue(item) do?

Back (Answer)

» Add a new item to the rear of the queue

#13
Front (Question)

What does deQueue do?

Back (Answer)

» Remove the front item from the queue and return it

#14
Front (Question)

What does isEmpty() do?

Back (Answer)

» Test to see whether the queue is empty

#15
Front (Question)

What does isFull() do?

Back (Answer)

» Test to see whether queue is full

#16
Front (Question)

What is a front pointer also known as?

Back (Answer)

» Header pointer

#17
Front (Question)

What is a queue overflow?

Back (Answer)

» Where items are enqueued, added to the back in a full queue

#18
Front (Question)

What is a queue underflow?

Back (Answer)

» While trying to dequeue an item from an empty queue

#19
Front (Question)

What is a queue an example of?

Back (Answer)

» Linear data structure

#20
Front (Question)

What are the 2 ways an abstract data type can be implemented?

Back (Answer)

» Using either a dynamic or static data structure

#21
Front (Question)

What is a dynamic data structure?

Back (Answer)

» Refers to a collection of data in memory, that has the ability to grow or shrink in size » Does with the aid of the heap

#22
Front (Question)

What is the heap?

Back (Answer)

» A portion of memory from which space is automatically allocated or de-allocated as required

#23
Front (Question)

What is a disadvantage of a dynamic data structure?

Back (Answer)

» The data structure may cause overflow if it exceeds the maximum memory limit, and the program will crash

#24
Front (Question)

What are the benefits of inbuilt dynamic data structures?

Back (Answer)

» Many methods such as append are already written in