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.
Agreed. Definitely wouldn't have figured that out without downloading the case. I guess it's to get you to consider all possible cases (i.e. one where only one person is from a country) but it's difficult when you don't have an actual person to clarify the specs. However, if you look at the prompt carefully the info is there - astronauts are numbered 0 to N-1, meaning you should ensure that you handle one that isn't in any pairs.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Journey to the Moon
You are viewing a single comment's thread. Return to all comments →
Agreed. Definitely wouldn't have figured that out without downloading the case. I guess it's to get you to consider all possible cases (i.e. one where only one person is from a country) but it's difficult when you don't have an actual person to clarify the specs. However, if you look at the prompt carefully the info is there - astronauts are numbered 0 to N-1, meaning you should ensure that you handle one that isn't in any pairs.