Trees Flashcards
1
Q
Preorder traversal
A
In a recursive fashion, first process the root, then the left child, then the right child.
2
Q
In-order traversal
A
In a recursive fashion, first process the left child, then the root, then the right child.
3
Q
Post-order traversal
A
In a recursive fashion, first process the left child, then the right child, then the root.
4
Q
Level-order traversal
A
First process the root node, then go down to the next level and process all nodes, and keep going down in that fashion.
5
Q
A