You are viewing a single comment's thread. Return to all comments →
Python 3
def flatlandSpaceStations(n, c): length = len(c) c.sort() distances = set(map(lambda x: math.floor((c[x+1]-c[x])/2), range(length-1))) distances.add(c[0]-0) distances.add(n-1-c[-1]) return max(distances)
Seems like cookies are disabled on this browser, please enable them to open this website
Flatland Space Stations
You are viewing a single comment's thread. Return to all comments →
Python 3