Fundamentals of Data Structures Flashcards

1
Q

Define Data Structure

A

Any method used to store data in an organised and accessible format.

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

Define Array

A

A list/table of data, with an associated name used to reference it. Each item is called an ‘element’ and all elements have the same datatype.

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

One Dimensional vs Two Dimensional Arrays

A
  • A one dimensional array is used to store a list of data.
  • A two dimensional array is used to store a table of data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Limitations of Arrays

A
  • They are allocated a fixed size when created, which cannot be changed during runtime.
  • They only store elements of the same data type.
  • Arrays take up the same amount of memory whether they are full or empty, meaning sparsely populated arrays lead to inefficient memory usage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define Text File

A

A file that contains human-readable characters.

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

Define Binary File

A

A file that stores data as sequences of 1s and 0s

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

Define Record

A

One line of a text file

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

Define Field

A

An item of data

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