There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is to fence the entire garden using the minimum length of rope as it is expensive. The garden is well fenced only if all the trees are enclosed. Your task is to help find the coordinates of trees which are exactly located on the fence perimeter.
具体描述:https://leetcode.com/problems/erect-the-fence/description/
给了list of二维上的点,求最短包围住这些点的fence位置:凸问题
Solution:
思路:
http://www.cnblogs.com/grandyang/p/7745697.html
Time Complexity: O(N) Space Complexity: O(N)
Solution Code: