You are viewing a single comment's thread. Return to all comments →
function flatlandSpaceStations(n, c) { let maximumSpace = 0 for (let i = 0; i < n; i++ ){ let minSpace c.map((item) =>{ if(minSpace === undefined || ((Math.abs(item - i) < minSpace))){ minSpace = Math.abs(item - i) } } ) if(minSpace > maximumSpace){ maximumSpace = minSpace } } return maximumSpace }
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 →