New course! Every coder should learn Generative AI!
Try a free lesson0
Why my code not printing the tree level/pre/post/in order traversal ?
1 Answer
+ 1
you need to assign the returned pointer from the function "insertIntoBST" to the pointer root:
root = insertIntoBST(root , data) ; // line 54