Hey guys, for my project i had to make a BST that prints the route of a number. for example if i have 1,3,6,2,5,8,9 and i want it to show me the route it passes to get to 8. (which would be 1,3,6,8). i have a code here but it doesnt print out anything at all, so i dont even know if i got it right...
Are you sure your tree is built? I don't immediately see a reason why the printing would be wrong, so I'm guessing it's the underlying code. I'd check with a debugger if I were you.
(P.S.: How can you be sure that it'll be 1->3->6->8?)