Topic 2 Fundamentals of data structures Flashcards

(12 cards)

1
Q

What are data structures?

A

Used by computers as the containers within which information is stored.

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

What is an array?

A

An indexed set of related elements

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

What are the requirements of an array?

A

Be finite, indexed and must only contain elements with the same data types

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

What number do arrays start from?

A

0

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

How is information stored in computers?

A

As a series of files. Each file is made up of record which are composed of a number of fields

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

Describe what abstract data structures are?

A

Data structures that don’t exist as data structures in their own right, instead they make use of other data structures to form a new way of storing data.

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

What is a Queue?

A

An abstract data structure based on array. the first item added to a queue is the first to be removed (FIFO)

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

When are queues used in computer algorithms?

A

Used by computers in keyboard buffer, where each keypress is added to the queue then removed when the computer has processed the keypress. Ensuring the letters appear on screen in the same order they were typed.

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

Describe how linear queues work?

A

Haas two pointers a front pointer and a rear pointer. They can be used to identify to place a new item in a queue or to identify which item is at the front of the queue.

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

What are circular queues?

A

A type of queue in which the front a rear pointers can move over the top ends of the queue, making for a more memory efficient data structure

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

What are priority queues?

A

Items are assigned a priority. items with high priority are dequeued before low priority items. In the case that two or more items have same priority FIFO is used.

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