Data Structures Flashcards

1
Q

Define primitive data type

A

Can only contain only one value

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

Examples of primitive data type

A

Integer
Real (fractions)
Boolean
Character

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

Define compound data type

A

Combination of primitive data types

record

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

Define data structure

A

Collection of data that is organised to allow efficient processing

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

Define abstract data type

A

conceptual model that describes how data is organised

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

Define static data structures

A

reserves memory for a set amount of data

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

Advantages of static data structures

A

being able to access element directly (by index)

Easier to program, no need to check data structure size at any point

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

Disadvantages of static data structures

A

Inefficient memory use (if not full)

Can crash if not enough space is allocated

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

Define dynamic data structures

A

number of data items constrained only to the overall memory allocation of the program
(linked list)

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

Advantages of dynamic data structures

A

Memory capacity is not fixed.

Only necessary memory is used.

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

Disadvantages of dynamic structures

A

elements cannot be readily accessed directly.

harder to program, need to keep track of its size and data item locations.

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

Define memory heap

A

large pool of memory from which the running program can request chunks (linked list is taken from it)

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

Define array

A

holds collection of values of the same data type

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