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.
defhackerlandRadioTransmitters(x,k):# Write your code herex=sorted(x)res=0whilex:i=x[0]j=i+kwhilejnotinx:j-=1foridxinrange(len(x)):ifx[0]inrange(j-k,j+k+1):x.pop(0)else:breakres+=1returnres
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 →