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
hello in your dp
its zero na
the main lead of drama the ugly duckling
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
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
Answer:
hello in your dp
its zero na
the main lead of drama the ugly duckling