Tree Traversal

1. Consider the following Inorder and Preorder traversal of a binary tree:
Inorder = {6, 4, 7, 2, 12, 5, 1, 18, 3, 19}
Preorder = {1, 2, 4, 6, 7, 5, 12, 3, 18, 19}
Reconstruct the binary tree and choose the correct postorder traversal from the given options:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. Consider the following Inorder and Postorder traversal of a binary tree:
Inorder = {D, B, E, A, F, G, C, H}
Postorder = {D, E, B, F, G, H, C, A}
Reconstruct the binary tree and choose the correct preorder traversal from the given options:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. Which pair of traversal results is sufficient to uniquely reconstruct a binary tree when all node values are distinct?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

4. In a preorder traversal, which node is encountered first?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. In a postorder traversal, which node of a subtree is visited last?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. When reconstructing a binary tree from preorder and inorder traversals, what does the first element of the preorder sequence represent?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. When reconstructing a binary tree from inorder and postorder traversals, what does the last element of the postorder sequence represent?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. Consider a binary tree with preorder traversal A, B, D, E, C and inorder traversal D, B, E, A, C. Which node is the root?

Explanation

Explanation

Explanation

Explanation

9. Why is an inorder traversal useful when reconstructing a binary tree from preorder or postorder information?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation