8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9b25b3 commit 45a39f6Copy full SHA for 45a39f6
convex-hull/convex-hull.py
@@ -51,6 +51,7 @@ def compute_hull(self):
51
far_point = None
52
while far_point is not start:
53
54
+ # get the first point (initial max) to use to compare with others
55
p1 = None
56
for p in points:
57
if p is point:
@@ -62,6 +63,7 @@ def compute_hull(self):
62
63
far_point = p1
64
65
for p2 in points:
66
+ # ensure we aren't comparing to self or pivot point
67
if p2 is point or p2 is p1:
68
continue
69
else:
0 commit comments