question:https://hack.codingblocks.com/contests/c/608/1284
https://ide.codingblocks.com/s/60925
not getting the output in correct order
Https://ide.codingblocks.com/s/60925
HI Aastha, your preorder function was not correct. Preorder traversal is node, left, right. Also, I’ve modified the case where you’re finding the inorder successor. Go through the code and reply to this thread in case of doubts.
You can refer to the code here:
https://ide.codingblocks.com/s/60948