Tree Traversal

1. Let us consider VV to be the total number of vertices and EE to be the total number of edges in a tree. What is the time complexity of Depth First Traversal in this tree?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. While performing inorder traversal in a tree, what is the sequence of nodes that gets visited?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. While performing preorder traversal in a tree, what is the sequence of nodes that gets followed?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

4. For the postorder traversal in the binary tree, what is the sequence of nodes that gets accessed?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. Which of the following is a Depth First Traversal of a binary tree?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. Consider a binary tree with root AA, left child BB, and right child CC. If BB has children DD and EE, what is the preorder traversal?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. Consider the same tree with root AA, left child BB, right child CC, and children DD and EE under BB. What is the inorder traversal?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. Consider a binary tree with root AA, left child BB, right child CC, and children DD and EE under BB. What is the postorder traversal?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

9. Which statement about recursive Depth First Traversal is correct?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation