Hackerland Radio Transmitters

  • + 1 comment

    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!

    • + 1 comment

      [9, 12] cannot be covered by 1 transmitter because the antenna power = 2, and the distance between 9 and 12 is 3.

      • + 0 comments

        Thank you! After long hours of thinking, my mind is so blur.