Build bst (what is segmentation fault) it always appear in my code

Hey @Shubham_helloworld you have to initialize your root with 0


If it clears your doubt dont forget to mark it resolved on my doubts section :smiley:

but output is coming wrong please check

@Shubham_helloworld the output is coming correct but in the question it says balanced bst
your code is simply making a bst and printing it but you also have to make it balanced.


see this you have to make it like this. middle as root

ohh i havent noticed that

if your doubt is cleared dont forget to mark it resolved :smiley: