LeetCode 587: Erect the Fence
Problem Restatement We are given an array trees , where each tree is represented by a point: [x, y] We need to build the shortest fence that encloses all trees. Return the coordinates of all trees that lie exactly on the fence perimeter. This is a convex hull problem. The important detail is that trees on straight boundary edges must also be included, not only the corner points. The input...