sort the points based on 'x' value ascending - NLogN

-for every given set of points, binary search the mid-point (try matching X and then Y) - NLogN
total time complexity = 2 (NLogN)

-since time is constant, we are safe assuming distance never changes, but for a given distance there might exists more than one set of points - so never choose distance but only X for sorting
if time were to be a variable then the closest mid-point (because the points change by (deltaX,deltaY) every second) using this approach is always away by P(deltaX, deltaY) + F( P(deltaX,deltaY) , NLogN )

P(deltaX, deltaY) - shift occurred due to time

F( P(deltaX,deltaY) , NLogN ) = shift occurred because of the sort and search operation

Please correct me if I was mistaken