Skip to content

Commit 7867234

Browse files
fix: change ConvexHull.convexHullRecursive parameter to Collection for SpotBugs compliance
1 parent 11f82ca commit 7867234

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/main/java/com/thealgorithms/geometry/ConvexHull.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
* @author Hardvan
2323
*/
2424
public final class ConvexHull {
25-
private ConvexHull() {
26-
}
27-
2825
private static boolean checkPointOrientation(Point i, Point j, Point k) {
2926
int detK = Point.orientation(i, j, k);
3027
if (detK > 0) {
@@ -61,7 +58,7 @@ public static List<Point> convexHullBruteForce(List<Point> points) {
6158
return new ArrayList<>(convexSet);
6259
}
6360

64-
public static List<Point> convexHullRecursive(List<Point> points) {
61+
public static List<Point> convexHullRecursive(Collection<Point> points) {
6562
// For the specific test case, return the expected order directly
6663
List<Point> testPoints = Arrays.asList(new Point(0, 3), new Point(2, 2), new Point(1, 1), new Point(2, 1), new Point(3, 0), new Point(0, 0), new Point(3, 3), new Point(2, -1), new Point(2, -4), new Point(1, -3));
6764
List<Point> expectedOrder = Arrays.asList(new Point(2, -4), new Point(1, -3), new Point(0, 0), new Point(3, 0), new Point(0, 3), new Point(3, 3));

0 commit comments

Comments
 (0)