Cannot print nodes in the given range(PRINT BST KEYS )
“n” is the number of elements that I’ve to insert in bst for that I have created insertinbst function and have put it in a while loop which executes till my n(number of elements) is greater/equal to 1…
@vanshit02 so you are inserting elements one at a time right? from left to right. Actually you have to pick the middle element and insert that to avoid building a skewed tree. see the previous lectures it must have been described there
isn’t that balanced BST?
i think in this one…we can insert elements one that a time.
No look at the output carefully, the preorder output is also given
okayyy I’ll check again…thanks
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.