4.2.1 Data Structures and Abstract Data Types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Data Structure definition

A

Containers used by computers to store information within.

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

Array definition

A

An indexed set of related elements.

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

An array must be

A

Finite, indexed and only contain elements with the same data type.

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

Array indexes start from

A

0

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

Two types of arrays

A

One dimensional and two dimensional.

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

How is information stored by computers

A

As a series of files.

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

Files are made up of

A

Records

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

Records are composed of

A

Fields

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

What are abstract data structures

A

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

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

Example of abstract data strucutres

A
Queues 
Stacks
Graphs
Trees
Hash tables
Dictionaries
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Queue definition

A

Abstract data structure based on an array

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

First thing added to a queue is

A

The first thing to be removed

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

Queues are used by computers in

A

Keyboard buffers, each keypress is added to the queue and then removed when the computer has processed the keypress - ensuring the letters appear on the screen in the same way they were typed.

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

An algorithm using the queue is

A

The breadth first search algorithm to keep track of which nodes in a network have been visited.

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

Linear queue components

A

Two pointers - a front pointer and a rear pointer

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

linear queue pointers are used to

A

Identify which item is at the front of the queue

17
Q

The front pointer points to

A

The front of the queue

18
Q

The rear pointer points to

A

The next available position in the queue.

19
Q

Queue operations

A

Enqueue
Dequeue
IsEmpty
IsFull

20
Q

How can emptiness within a queue be detected

A

By comparing the front and rear pointers - if they are the same, the queue is empty

21
Q

What does IsFull return and when

A

True, if the queue has no available positions that are behind the front pointer.