i am not able to understand how to write in order traversal from the post order traversal
moreover the question and answer in the quiz don’t match
ques—
Postorder traversal of a given binary search tree is:
10, 3, 2, 5, 6, 4, 8, 11, 9, 15, 20, 19, 12, 7
find the inorder traversal
and the correct answer according to them is
2, 3, 4, 5, 6, 7, 8 , 9, 11, 12, 15, 19, 20
where is 10 in this !!!
plzz explain me the approach for these kind of problems.
and 1 more doubt
For a perfect binary tree of height h and n nodes the sum of heights of all the nodes is:
ans is O(n)
plz explain it to me? How?