Convex Hull in C++

Anirudh C V Jun 17, 2021

Use Graham Scan's Algorithm for finding Convex Hull in C++ from given set of points in the polygon

Convex Hull of a set of points, in 2D plane, is a convex polygon with minimum area such that each point lies either on the boundary of polygon or inside it.

We use Graham Scan's Algorithm for finding Convex Hull.

The expected Time Complexity is O(n*log(n)) and the expected Space Complexity is O(n), where n is the total number of points in the polygon.

INPUT :

1. Enter number of points that are going to be given as input - 3

2. Then give the points list - {1 , 5} , {4 , 4} , {2 , 1}

OUTPUT :

{1 , 5}
{2 , 1}
{4 , 4}

Project Files

Loading...
..
This directory is empty.

Comments (0)

Leave a Comment