sir/mam,
please tell me how to make a bst using inorder traversal only.
Replace sum with greater nodes
hello @Korou
for this problem u need to build balanced bst from the given inorder tree.
approach is simple .
calculate mid , this will act as root node.
now array from index 0 to mid-1 will come in left subtree .
and
array from index mid+1 to e will come in right subtree .
recusively build the left and right subtree by calling function on both the sides.

sir,please check my code is getting TLE
in ur replace sum function add base case.
if root==NULL then return
Thank a lot for the help sir.
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.