|
|
|
|
|
by ginko
962 days ago
|
|
I would be interested in an explanation why it's O(nlog(n)). It requires sorting the points along one axis which already gives O(nlog(n)) as a lower bound, but I'd be interested in how the line-sweeping would need to be done to not go over that. The number of points in the beach front should roughly scale with the square root of points, so a naive search/replace per point insertion would take sqrt(n) operations and a O(n*sqrt(n)) overall runtime. |
|