Data Types Flashcards Preview

Computing > Data Types > Flashcards

Flashcards in Data Types Deck (15):
0

What are linked list?

Linked list are lost where each item contains the address of the next time in the list

1

What are queues

Queues are first in first out data structure.

2

What's an example of a queue

A video buffer is an example of a use for a queue.
Printing job, simulation

3

What operation can be carried out on a queue

•add a new item to the rear of the queue
•remove an item from the front of the queue
•check whether queue is empty
• return value of the first element and remove it

4

What are the 3 different types of queues

Circular queues, linear queues and priority queues

5

What are circular queues

A circular queue is a queue which has a fixed amount of space and where both end are treated as being connected together.

6

What are the two variable that a circular queue require

A circular queue requires one variable which points to the head and the other the tail of the queue

7

What are linear queues

Linear queues are queues where elements are always added at one end of a list and removed at the other end.

8

What are priority queues

Priority queues are queues where items are removed in order of their priority, regardless of the order In which the items are added

9

How can you check if a circular queue is empty without using a special empty variable?

Head==Tail

10

How can you check if a circular queue is full without using a special full variable

Head == tail + 1

11

What are stacks?

Stacks are last in first out data structure. Used when data added last is required first.

12

What's the most common use for stacks?

Calling procedures during a program.

13

What are the operations that can be carried out by stacks

•Check whether the stack is empty
•check whether the stack is full or not
•Look at the top value and remove it (pop)
•put a new value on top of the existing stacks (push)

14

How to determine whether the stack is empty

Empty stack has topofstack value of zero.