How to find two most distant points?

后端 未结 9 1977
旧巷少年郎
旧巷少年郎 2020-11-29 19:05

This is a question that I was asked on a job interview some time ago. And I still can\'t figure out sensible answer.

Question is:

you are given set of points

9条回答
  •  一生所求
    2020-11-29 19:44

    This question is introduced at Introduction to Algorithm. It mentioned 1) Calculate Convex Hull O(NlgN). 2) If there is M vectex on Convex Hull. Then we need O(M) to find the farthest pair.

    I find this helpful links. It includes analysis of algorithm details and program. http://www.seas.gwu.edu/~simhaweb/alg/lectures/module1/module1.html

    Wish this will be helpful.

提交回复
热议问题