You are viewing a single comment's thread. Return to all comments →
Managed to write this in python, it works but is not optimised:
def flatlandSpaceStations(n, c): max_distance = 0 for i in range(n): new_dist = [] for j in c: new_dist.append(abs(i - j)) max_distance = max(min(new_dist), max_distance) return max_distance
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 →
Managed to write this in python, it works but is not optimised: