You are viewing a single comment's thread. Return to all comments →
Python:
def hackerlandRadioTransmitters(x, k): x.sort() res = 1 mid = x[0] + k for n in x: if n <= mid: end = n + k elif n > end: res += 1 mid = n + k return res
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 →
Python: