Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  The inorder and preorder Traversal of binary ... Start Learning for Free
The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.
  • a)
    dbefacg
  • b)
    debfagc
  • c)
    dbefcga
  • d)
    debfgca
Correct answer is option 'D'. Can you explain this answer?
Most Upvoted Answer
The inorder and preorder Traversal of binary Tree are dbeafcg and abde...
Explanation:

Given Traversals:
- Inorder: dbeafcg
- Preorder: abdecfg

Steps to Find Post-order Traversal:
- The first element in the Preorder traversal is the root of the tree (a).
- Find the index of the root in the Inorder traversal (index 3).
- The elements to the left of the root in the Inorder traversal represent the left subtree (dbe).
- The elements to the right of the root in the Inorder traversal represent the right subtree (fcg).
- Recursively repeat the above steps for the left and right subtrees.

Post-order Traversal:
- Left Subtree: dbef
- Right Subtree: cg
- Root: a
- Combine the post-order traversals of the left subtree, right subtree, and root to get the final post-order traversal: debfgca
Therefore, the correct post-order Traversal of the binary tree is debfgca.
Free Test
Community Answer
The inorder and preorder Traversal of binary Tree are dbeafcg and abde...
Inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively.
From preorder(Parent left right) and inorder ( left parent right) we can easily find post order.
From preorder(a(bdecfg)), it is clear that a is parent node(root node), Now we will look for left subttree in inorder traversal i.e. dbe and fcg.
To find root node and left subtree and right subtree of these subtree we will do the same process as above:
Now see this scenario in graph:

Now from above tree we can easily find out the post order(left right parent):
i.e. debfgca.
So, option (D) is correct.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer?
Question Description
The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer?.
Solutions for The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer?, a detailed solution for The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? has been provided alongside types of The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.a)dbefacgb)debfagcc)dbefcgad)debfgcaCorrect answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev