Chapter 12 - Graph and Tree Traversal Flashcards

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

What is implementation?

A

Creating code to produce a programmed solution.

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

What is an array?

A

A set of data items of the same grouped together with the same identifier.

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

What are the two ways of traversing a graph?

A

Depth first or Breadth first.

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

How do you traverse a graph depth first?

A

A method for traversing a graph that starts at chosen node and explores as far as possible along each branch away from the starting node before backtracking to visit unvisited nodes.

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

How do you traverse a graph breadth first?

A

A method for traversing a graph that explores nodes closest to the starting node first before progressively exploring nodes that are further away. A queue is used to keep track of the nodes to visit.

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

What is a queue?

A

A data structure where the first item added is the first item removed.

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

What is pre-order?

A

A method traversing a tree by visiting the root, traversing the left subtree and traversing the right subtree.

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

What is in-order?

A

A method of traversing a tree by traversing the left subtree, visiting the root and traversing the right subtree.

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

What is post-order?

A

A method of traversing a tree by traversing the left subtree, traversing the right subtree and visiting the root.

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

What is binary search?

A

A technique for searching data that works by splitting datasets in half repeatedly until the search data is found.

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

Define recursion.

A

A technique where a function can call itself in order to complete a task.

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