Traversing of trees Flashcards
1
Q
What is a breadth-first-search?
A
A method of traversing an entire graph by first visiting all neighbours of the first node before repeating the same with each neighbour in the order they were visited
2
Q
What is depth-first-search?
A
A method of traversing an entire graph by travelling as far along one route before back tracking and trying and alternative unexplored routes
3
Q
What is pre-order traversal?
A
Root, Left, Right
4
Q
What is in order-traversal?
A
Left, Root, Right
5
Q
What is post-order traversal?
A
Left, Right, Root