Binary Search Trees Flashcards
1
Q
What is preorder traversal? Give an example.
A
When operations to the node occur and then we traverse with the function call left then right. Copying the tree.
2
Q
What is inorder traversal? Give an example.
A
When we recursively go left, do out operations, then go right. Displaying our data in order.
3
Q
What is postorder traversal? Give an example.
A
Traverse left, then right, then perform operations after the recursive call.
Remove all.
4
Q
Where do you find duplicate data to root’s data?
A
Duplicate data to root’s data will ALWAYS be in the right subtree.