sir in vedio lectures to create bst u are changing root of tree everytime but without passing root as refrencing how is it possible in vedio cpp-binary search tree-insertion and build
Insertion and building in binary tree
hey @Tanna, yes they are not passing it by reference but they are returning updated value of root to calling function if you observe carefully.
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.