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.
Sample 1 - it can be for any node. As mentioned - if there are multiple answers, you can print just one. But I came to discussion forum for the sample 2 itself. Why an extra edge?
the question is not clear for me. I don't understand why:
sample 1. why node 1 connect to one of node 4,6,7,8 is not an answer? why node 5 is picked?
sample 2. why need drew two lines? one should enough.
No more comments
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sample 1 - it can be for any node. As mentioned - if there are multiple answers, you can print just one. But I came to discussion forum for the sample 2 itself. Why an extra edge?
same question is mine. in second case why required 2 line only one line is enought
the question is not clear for me. I don't understand why: sample 1. why node 1 connect to one of node 4,6,7,8 is not an answer? why node 5 is picked? sample 2. why need drew two lines? one should enough.