leetcode_587.Erect the Fence?待解决

来源:互联网 发布:暗黑修仙数据库 编辑:程序博客网 时间:2024/05/20 11:21

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/

思路:

原创粉丝点击