We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Solved the problem but had to.
1. Create node object.
2. Create a breathFirst to read input.
3. Create a depthFirst to change height.
4. Create a Inorder to print.
Took 3 hours total. Is is listed as "Easy?" Is there an easier way than the apporche I did?
Cookie support is required to access HackerRank
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 →
Solved the problem but had to. 1. Create node object. 2. Create a breathFirst to read input. 3. Create a depthFirst to change height. 4. Create a Inorder to print.
Took 3 hours total. Is is listed as "Easy?" Is there an easier way than the apporche I did?