Question: Write a program implementing the brute-force algorithm for the convex-hull problem as described on pages 111 and 112 (Section3.3) of your textbook. Begin with the
Write a program implementing the brute-force algorithm for the convex-hull problem as described on pages 111 and 112 (Section3.3) of your textbook. Begin with the bottom-most point and specify the points in counter-clockwise order.
In implementing your program, read in the input as shown (the first line is the number of points , and the remaining lines contain the and coordinates of point ). Assume all coordinates are integers:
SAMPLE INPUT:
6 4 17 4 14 7 15 5 13 2 10 57
Your output will consist of a lines, where is the number of convex hull points, in the format shown:
SAMPLE OUTPUT:
(5, 7) (7, 15) (4, 17) (2, 10)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
