• + 5 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?