Distribution Center Placement
Meta interview questions · Medium · Coding round · 5 tests
A logistics company is evaluating candidate distribution-center locations on a 1D highway.
Given an array of integer coordinates locations, choose a hub coordinate from the array that minimizes the
sum of absolute distances to every location.
Run your code with Ctrl+Enter to see results.