Given n points on the outline of the unit circle, I want to calculate the closest 2 points.
The points are not ordered, and I need to do it in O(n) (so I cannot sort them clockwise...)
I once knew the solution for this, but forgot it... the solution includes hashing, and splitting the circle to n or more slices.
If you found an algorithm to calculate only the distance, and not the specific points, it will be good enough..