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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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

What is postorder traversal? Give an example.

A

Traverse left, then right, then perform operations after the recursive call.
Remove all.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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