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.
I think the result should be 3. When sorting: [2, 4, 5, 6, 9, 12, 15]
Result is:
[2, 4, 5, 6] -> 1 transmitter
[9, 12] -> 1 transmitter
[15] -> 1 transmitter
Total 3 transmitters.
Any help? Thank you!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hackerland Radio Transmitters
You are viewing a single comment's thread. Return to all comments →
Test case #2: 7 2 9 5 4 2 6 15 12
Expected output: 4
I think the result should be 3. When sorting: [2, 4, 5, 6, 9, 12, 15] Result is: [2, 4, 5, 6] -> 1 transmitter [9, 12] -> 1 transmitter [15] -> 1 transmitter Total 3 transmitters. Any help? Thank you!