Data Structures Flashcards

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

What is a tree?

A

A graph with no cycles

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

What is in-order traversal?

A

Left node, root, right node

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

What is pre-order traversal?

A

Root, left node, right node

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

What is post-order traversal?

A

Left node, right node, root

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

How do gateways differ from routers?

A

Gateways allow for networks of different types to be connected, routers only connect networks of the same type

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

What is the domain name system?

A

DNS is used to translate URLs into IP addresses

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

What is hashing sued for?

A

To read and write data to and from a large data structure

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

What is a hashing algorithm?

A

Ah algorithm that is applied to data to provide a numerical value that is used as an index in the data structure

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

What are two identical keys called?

A

Synonyms

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

What is the name given to the process during which two identical keys are produced?

A

Collisions

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

What is the most common way of handling collisions?

A

To store the value in the next available memory location

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

What is the most common hashing algorithm?

A

Diving the key by the number of available memory locations and using the remainder as the index

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

What is the process of folding?

A

Splitting a value into equal components, adding them together, and using the remainder when divided by the number of available memory locations as the index

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

What is collision resolution used for?

A

To reduce the number of collisions when a hash table starts to get full

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

How does collision resolution work?

A

Rehashing is a common collision resolution used to fill remaining memory locations

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

What is the definition of a graph?

A

A set of vertices connected by arcs

17
Q

What is the definition of an undirected graph?

A

A graph where all arcs are bidirectional

18
Q

What is the definition of a digraph?

A

A graph where all arcs are mono-directional

19
Q

What is a weighted graph?

A

A graph where each arc is assigned a value

20
Q

Name an advantage of using adjacent matrices over adjacency lists

A

Matrices are easier to add to, access, modify, and process

21
Q

Name a disadvantage of using adjacency matrices

A

They use large amounts of memory and aren’t suitable for sparse graphs