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.
In the explanation for Sample 1. Is there a reason for the solution being only adding edge (1,5)? It seems that node 1 could be connected to any of 4, 5, 6, 7, or 8 or that 2 could be connected to 3. Any one of those edges would seem to be a proper solution.
Thanks!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Black and White Tree
You are viewing a single comment's thread. Return to all comments →
In the explanation for Sample 1. Is there a reason for the solution being only adding edge (1,5)? It seems that node 1 could be connected to any of 4, 5, 6, 7, or 8 or that 2 could be connected to 3. Any one of those edges would seem to be a proper solution.
Thanks!