i am unable to code this as explained in the video, could you please share the link of the code ,
BST - CONSTRUCT FROM PREORDER
note:
- inorder traversal of BST is sorted array
you are given the preorder traversal
you can find the inorder traversal by sorting the array
now you have preorder and inorder traversal of tree so you can easily find the tree (same as done in binary tree).
i hope you understood the approach
now try once
if you are not able to code I will give you the code
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.