why is’n it printing any thngs?
Build BST problem
Hi @17manishms
Your code was not printing any output because in the buildbst function you are using while loop in which start and end are not changing that is why it has become an infinte loop. And also after correcting that you will get only last input as output because you are passing root as an argument and when start>end you are returning root instead of NULL. I have made changes to your code have a look at it.
Here is your corrected 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.