0
How can i order the nodes in BST??
I want to print the node its arrange(order) is 4 not its value Could anyone help me ?
1 Réponse
0
We'll need a bit more info. Do you have it written in code playground? If so, share that code and I'll try to point you in the right direction. It'll be hard to help you otherwise.
If you're using recursion then you could have a counter variable which increments by 1 every time a node is visited and the the value of the counter can be output instead of the value of the node.