Graph traversal Flashcards
1
Q
Define breadth-first search
A
- path with least number of nodes between two points
- rows from the node
- queue
2
Q
Breadth-first search algorithm
A
- start node
- searches through all adjacent nodes before moving on
Likes waves
3
Q
Define depth-first search
A
- whether there is a path between two nodes of a graph
- post order
- stack
4
Q
Depth-first search algorithm
A
- start node
- searches down branch of the graph