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.
I made a lot of cognitive effort into numbering the tree by BFS to get the nodes' numbers right. The numbers from the input are the correct ones for the nodes, the input does not jump back or does anything funny to screw you, it is VERY well behaved.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Swap Nodes
You are viewing a single comment's thread. Return to all comments →
Don't do what I did!
I made a lot of cognitive effort into numbering the tree by BFS to get the nodes' numbers right. The numbers from the input are the correct ones for the nodes, the input does not jump back or does anything funny to screw you, it is VERY well behaved.