Manhattan Meeting Place


Collapse Content

You decided to add a new feature to your app. Given the locations of different people, the app will find the best place for them to meet so as to minimize the total travel time of all the parties.

Format
In each case, you will be given all the co-ordinates in a single Array: {x1 y1 x2 y2... ...xn yn} where each person n is located at position {xn, yn}. Calculate and print the best intersection to meet on a map.

Example
If given the following input:

0 2 2 7 7 5

Meeting-point-graph

...Print 2 5 which would be the location with the minimum total travel time.

Challenge

Print the co-ordinates of the meeting point that will minimize the total combined travel time.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Comments

Contact Us
Sign in or email us at [email protected]