Ask Question
19 October, 18:49

The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:

(A) d e b f g c a

(B) e d b g f c a

(C) e d b f g c a

(D) d e f g b c a

+1
Answers (2)
  1. 19 October, 19:31
    0
    Option (A)

    Explanation:

    In the post order traversal, we always print left subtree, then right subtree and then the root of the tree. In preorder traversal, First the root is printed, then, left subtree and at last, right subtree, so, the first element in preorder is the root of the tree and we can find elements of left sub tree from in order as all the elements written left to the root will of left subtree and similarly the right one. This is how repeating it will give the post order traversal.
  2. 19 October, 19:53
    0
    The correct answer to the following question will be Option A (d e b f g c a).

    Explanation:

    In the given question the binary tree is missing, so the question is incomplete. The complete question will be:

    a

    / /

    b c

    / / / /

    d e f g

    Now coming to the answer:

    In this tree we are applying the post order algorithm for traversing the tree is given below:

    Step 1: Go to the left-subtree.

    Step 2: Go to the right-subtree.

    Step 3: Print the data.

    The root 'a' is follow the algorithm Post order After applying the algorithm it comes to the node 'b', 'b' is also follow the Post order algorithm then it comes to 'd', after applying the algorithm Post order it prints 'd'. Similarly all the node follow the same algorithm.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers