Skip to content

Commit 92638a6

Browse files
committed
Fix
1 parent 0c88451 commit 92638a6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

+3-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ public static List<Point> convexHullBruteForce(List<Point> points) {
110110
boolean leftSide = checkPointOrientation(points.get(i), points.get(j), points.get((i + 1) % points.size()));
111111

112112
for (int k = 0; k < points.size(); k++) {
113-
if (k != i && k != j) {
114-
if (checkPointOrientation(points.get(i), points.get(j), points.get(k)) != leftSide) {
115-
allPointsOnOneSide = false;
116-
break;
117-
}
113+
if (k != i && k != j && checkPointOrientation(points.get(i), points.get(j), points.get(k)) != leftSide) {
114+
allPointsOnOneSide = false;
115+
break;
118116
}
119117
}
120118

0 commit comments

Comments
 (0)