Exam 1 Flashcards

1
Q

Depth first search algorithm steps

A

Start at origin vertex
– if no valid neighbors, return failure
– for each vertex reachable from the current vertex,
recursively search using that neighbor as the origin
– stop as soon as a recursive search is successful, and return success
– if none of the recursive calls was successful, return failure

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

BFS algorithm

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