Built Bst problem


few test cases ar not passing

hello @vivekpatel
ur create tree function is not correct.

after adding value to root node.

it should be root->left =createtree()
same for right subtree.

something like.
image

also dont make head pointer as global pointer that will be error prone.

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.