TCS
Company
Programming
Output
The in-order and pre-order traversal of a binary tree is D B E A F C G and A B D E C F G, respectively. The post-order 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
Read Solution (Total 5)
-
- Ans=DEBFGCA
It can be checked by comparing In with post or pre with post for other examples ..pattern will be same - 3 years agoHelpfull: Yes(3) No(0)
- just make a simple Tree with A,B,C,D,E,F,G
And with that tree find the post order (left,right,root).start from the bottom - 3 years agoHelpfull: Yes(1) No(0)
- D E B F G C A
- 3 years agoHelpfull: Yes(0) No(0)
- Based on the given preorder(root,left,right) and inorder(left,root,right) traversals construct a tree and predict post order traversal(left,right,root).
Preorder traversal is DEBFGCA
option a is correct answer - 3 years agoHelpfull: Yes(0) No(0)
- A. debfgca
- 2 years agoHelpfull: Yes(0) No(0)
TCS Other Question