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