You are viewing a single comment's thread. Return to all comments →
Hi, Thanks for the tip. So you mean you just used an array and didn't create a binary tree data structure?
I actually created a tree, loaded it with data swap the subtree, and traverse the tree to print the output.
Sounds like I over engineered! Would you like to exchange solutions?
Seems like cookies are disabled on this browser, please enable them to open this website
Swap Nodes [Algo]
You are viewing a single comment's thread. Return to all comments →
Hi, Thanks for the tip. So you mean you just used an array and didn't create a binary tree data structure?
I actually created a tree, loaded it with data swap the subtree, and traverse the tree to print the output.
Sounds like I over engineered! Would you like to exchange solutions?