Skip to content

Commit 4896267

Browse files
refactor 587
1 parent 50a9f60 commit 4896267

File tree

1 file changed

+0
-27
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-27
lines changed

src/main/java/com/fishercoder/solutions/_587.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,6 @@
77
import java.util.List;
88
import java.util.Set;
99

10-
/**
11-
* 587. Erect the Fence
12-
*
13-
* There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden.
14-
* Your job is to fence the entire garden using the minimum length of rope as it is expensive.
15-
* The garden is well fenced only if all the trees are enclosed.
16-
* Your task is to help find the coordinates of trees which are exactly located on the fence perimeter.
17-
18-
Example 1:
19-
Input: [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]]
20-
Output: [[1,1],[2,0],[4,2],[3,3],[2,4]]
21-
Explanation:
22-
23-
Example 2:
24-
Input: [[1,2],[2,2],[4,2]]
25-
Output: [[1,2],[2,2],[4,2]]
26-
Explanation:
27-
28-
Even you only have trees in a line, you need to use rope to enclose them.
29-
30-
Note:
31-
All trees should be enclosed together. You cannot cut the rope to enclose trees that will separate them in more than one group.
32-
All input integers will range from 0 to 100.
33-
The garden has at least one tree.
34-
All coordinates are distinct.
35-
Input points have NO order. No order required for output.
36-
*/
3710
public class _587 {
3811
public static class Solution1 {
3912

0 commit comments

Comments
 (0)