2. Fundamentals of Data Structures Flashcards

1
Q

Describe an array.

A

Stores a finite, ordered set of data within a single identifier.

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

What is the difference between a field and a record?

A

A field is a single item of data, but a record is a structure that stores multiple fields, organised based on attributes.

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

What is a dictionary?

A

A data structure consisting of set of keys that are mapped to their corresponding values.

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

What is a dynamic structure?

A

A data structure which memory allocation size can change throughout the execution of the program.

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

What is a graph?

A

A data structure consisting of a set of vertices connected by a set of edges.

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

What is a hash table?

A

A structure where a hashing algorithm creates a mapping between the keys and the values. Data can be accessed by recalculation, not search.

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

What is a queue?

A

A FIFO data structure.

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

What is a stack?

A

A LIFO data structure.

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

What is a static structure?

A

A data structure which is allocated a fixed amount of memory space.

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

What is a tree?

A

A connected, undirected graph with no cycles.

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

What is a vector?

A

A data structure representing a quantity with both magnitude and direction.

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

How can vectors be represented?

A

A list, a function, a geometric point.

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

What are the operations of a stack?

A

Peek, pop, push

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

What are two ways of representing a graph?

A

Adjacency list, adjacency matrix

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

What are some categories of graphs?

A

(Un)weighted or (un)directed.

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

What is special about a binary tree?

A

Each node has at most 2 nodes.

17
Q

What is a collision in terms of hash tables?

A

When the hashing algorithm creates the same hash for two different values.

18
Q
A