________Question related to Programming_______
1. Write code to print InOrder traversal of a tree?
No need to spam!✅
Answers
Answered by
1
Answer:
Construct Special Binary Tree from given Inorder traversal
1) Find index of the maximum element in array. The maximum element must be root of Binary Tree.
2) Create a new tree node 'root' with the data as the maximum value found in step 1.
3) Call buildTree for elements before the maximum element and make the built tree as left subtree of 'root'.
I hope you are satisfied with my ans
thanks
Similar questions