try searching "Manhattan Distance"
On Wednesday, April 25, 2012 11:10:38 AM UTC+5:30, tech coder wrote:
>
> Given N points(in 2D) with x and y coordinates. You have to find a
> point P (in N given points) such that the sum of distances from
> other(N-1) points to P is minimum.
>
> --
>
> Rega
I actually made a mistake. The function is convex and binary search works.
Look up GEOMETRIC MEDIAN in Wikipedia.
-Nima
On May 9, 2012 10:24 AM, "atul anand" wrote:
> sort p(xi,yi) on the basis of x-axis. find media of x-axis = x_median
> sort p(xi,yi) on the basis of y-axis. find media of y-ax