Google | Onsite | Best Meeting Point
Anonymous User
6406

Suppose we are trying to organize a meeting between a list of clients. Each client exist at a location (X,Y), where X and Y are integers. The clients can only travel along X or Y at a given time (Not diagonally). The goal is to choose a meeting location such that the total distance traveled by clients is minimized. Find the minimal total distance.

Example 1
Input = [ [1,0], [1,1] ]
Output = 1

Example 2
Input = [ [-4,3], [-2,1], [1,0], [3,2] ]
Output = 14

Comments (12)