Unit 8 - Algorithms Flashcards
1
Q
Give 2 methods of traversing a graph.
A
- Depth first
- Breadth first
2
Q
Describe the depth-first method of traversing a graph.
A
The depth-first traversal consists of moving down the nodes from the starting node, and backtracking to get to the next node.
3
Q
Describe breadth-first traversal.
A
Breadth-first traversal method consists of exploring a vertex and its unvisited vertices, and then exploring each of these vertices are the vertices tied to each of them.