Convex Hull
Graham’s Scan
Polar angle
In case of point with minimum y value tie, choose the left most point. Polar angle sorting can also be
said as sorting the points by the angle they and the lowest point make with the X axis.
Aka. keep anti-clockwise turns and drop clockwise turns.
Graham’s scan is O(n log n) due to initial sort of angles
Monotone Chain
Constructing Lower Hull:
Aka. keep anti-clockwise turns and drop clockwise turns.
----
Constructing Upper Hull:
Pseudocode
Monotone chain algorithm constructs the convex hull in O(n log(n)) time. We have to sort the points
first and then calculate the upper and lower hulls in O(n) time.
Left-Turn/Counter-Clockwise