« first day (418 days earlier)      last day (806 days later) » 

 
2 hours later…
10:07 PM
@flawr Once you have the distance between 3 points, you can check the relative position of every other point using triangulation
3N-6 where N > 3
...I feel like I'm missing something.
because there's no way my answer is better than the one on the math SE
oh, I figured out where I went wrong. I was assuming there's a magic function we want to call as few times as possible, and the actual complexity of the algorithm doesn't matter :P
that said, you can do the above, and then just use a standard algorithm for finding the closest pair of points
 

« first day (418 days earlier)      last day (806 days later) »