Question: Write a single file program (in java) that computes the convex hull of a set of points. Input from the terminal! First line will be

Write a single file program (in java) that computes the convex hull of a set of points. Input from the terminal!

First line will be integer n that indicates the number of points in the input set. Then the input contains n more lines, each containing two real numbers (x and y ) coordinates of one point in the input set.

Output : first line should denote the number of extreme points in the convex hull. Then each line will denote the indices of two extreme points that are connected by an edge of the hull.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!