5.3
unknown
python
a year ago
284 B
4
Indexable
# Continuation of 5.1's algorithm
points = [Point(4, 2), Point(7, -1), Point(3, -5), Point(-3, 6), 
          Point(-4, 4), Point(-1, -1), Point(-2, -6)]
hull = convexHull(points, len(points))
print("Convex Hull for given points:", hull)
# Graham’s Scan is O(n log n)
Editor is loading...
Leave a Comment