ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 43s17 days 22 hours 18 minutes 43 seconds.
ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 43s17 days 22 hours 18 minutes 43 seconds.

Sign in to watch this lesson
Advanced - Geometry Ā· 4:16
The convex hull is the smallest convex polygon containing a point set. Graham's scan takes the lowest point P0, sorts the rest by angle with cross products and keeps a stack that pops every point where the chain fails to turn left; Andrew's monotone chain gets the same hull from a plain (x, y) sort with a lower and an upper pass. Both cost O(n log n) for the sort plus O(n) for the stack, and the pop condition (⤠0 or < 0) decides whether points on hull edges are kept, with all-collinear inputs handled separately.