Can you see why Iam getting segmentation fault?

Hey @akash_281 your insert function is of node* and in your buildbst function when you are calling insert function you aren’t updating your root. I would suggest you to use array instead of vector and take reference from this 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.