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.
If you test print the indexes 2 D array, you can see that it will print exactly what has been given as input. However, my doubt is whether 1 is the root node in every case because the description hasn't accepted 1 in input but in the explanation they have kept root node=1.
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 →
If you test print the indexes 2 D array, you can see that it will print exactly what has been given as input. However, my doubt is whether 1 is the root node in every case because the description hasn't accepted 1 in input but in the explanation they have kept root node=1.