This problem was asked by Spotify.
You are the technical director of WSPT radio, serving listeners nationwide. For simplicity's sake, we can consider each listener to live along a horizontal line stretching from 0
(west) to 1000
(east).
Given a list of N
listeners, and a list of M
radio towers, each placed at various locations along this line, determine what the minimum broadcast range would have to be in order for each listener's home to be covered.
For example, suppose listeners = [1, 5, 11, 20]
, and towers = [4, 8, 15]
. In this case, the minimum range would be 5
, since that would be required for the tower at position 15
to reach the listener at position 20
.
The solution to this problem will be shared tomorrow with the premium subscribers of the newsletter.
——————————————————————————————————————
Bonuses/Promotion (Get Free Stuff)
To get access to the solution for this problem (and high-quality breakdowns of many other problems), subscribe to the publication right here. Join various other coders nailing interviews at top-tier firms such as Facebook, Microsoft, Google, Fidelity, and more:
To share interesting problems/solutions with me, reach out to me. Different social media of mine also have other content from me. Good problems and/or solutions receive a free shoutout + 2 months of the paid newsletter:
Reach out to me on Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/