Question: Write Java code for problem below ( Should not have plagerism ) B . Convex Hull Given a set of n distinct points on the
Write Java code for problem below Should not have plagerism
B Convex Hull
Given a set of distinct points on the D plane, output their convex hull.
Input
The first line of input has an integer : the number
of points.
lines follow, the th of which contains two integers and
: the coordinates of the th input point.
All points are distinct, and the input is such that the area of the convex hull is positive.
Output
First print an integer : the number of points in the convex hull.
Then print lines that describe the points. The points can be printed in
any order.
For Sample Input and Output Image is attached
Print every point which lies on the convex hull, ie if some points on the hull are collinear, print all of them see second sample case for an
example
Write Java code for problem above Should not have plagerism
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
