The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree

Q. The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is                                   .

Ans: 4

Sol:

Given, post-order – 8, 9, 6, 7, 4, 5, 2, 3, 1
and in-order – 8, 6, 9, 4, 7, 2, 5, 1, 3

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
We will be happy to hear your thoughts

Leave a reply

Gkseries.com
Logo
Register New Account