2.1 Data Structures and Abstract Data Types Flashcards

(11 cards)

1
Q

What is a Queue ?

A

An abstract data struture based on a queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the acronym for a Queue’s structure ?

A

FIFO (First In First Out)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many pointers does a linear queue have ?

A

2 (Front, Rear)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the characterisitcs of the pointers of a Circular Queue ?

A

Front and Rear Pointers can move over the two ends pf the queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens to items in a Priority Queue ?

A

Items are assigned a priority and dequeued based on priority.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main 4 operations for a Queue?

A

EnQueue, DeQueue, isFull, isEmpty

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the characteristics of Static Data Structures ?

A

Fixed in Size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the characteristics of Dynamic Data Structures ?

A

Variable in Size
Allocates and Deallocates memory from the heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the advantages / disadvantages of a Queue ?

A
  • Predictable Memory Usage
  • Fixed Length
  • Can’t resuse spaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the advantages / disadvantages of a Circular Queue ?

A
  • Can reuse spaces

-More complex to program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages / disadvantages of a Priority Queue ?

A
  • Gives preference to more important items.
  • Extra processing required to keep order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly