Algorithm to find special point k in O(n log n) time

后端 未结 2 797
孤城傲影
孤城傲影 2021-02-10 02:33

Give an n log n time lower bound for an algorithm to check if a set of points has a special point k.

k is defined as:

for a set A of points, if

2条回答
  •  半阙折子戏
    2021-02-10 03:17

    I'd say you just compute the center of mass (having removed duplicates first) and check if it is your k. Probably the only thing that cause it to be O(n log n) would be searching for a point at specified location.

提交回复
热议问题