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.
How to decide which is the ith node so that a color could be assigned to it? Will it be decided on the basis of its number, i.e. 1 is the 1st node, 2 is the 2nd node, and so on or on the basis of level order traversal of the tree?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Coloring Tree
You are viewing a single comment's thread. Return to all comments →
How to decide which is the ith node so that a color could be assigned to it? Will it be decided on the basis of its number, i.e. 1 is the 1st node, 2 is the 2nd node, and so on or on the basis of level order traversal of the tree?