Given an array of points, write an algorithm to compute the closest pair points.
In the figure above the closest pair of points have been marked in red. Given a set of points shown below, let be the distance between the closest pair of point. Then what is the value of ?
Let the two closest points in the following set of coordinate points be and . What is the value of ?
Given a polygon and a point implement an algorithm to check whether the point lies inside the polygon or not.
The algorithm should output if the point is inside the polygon, and if it isn't. Consider the following pairs of polygon and point shown below, if in the value output by the algorithm for the th pair of polygon and point, what is the value of the string ?
Details and assumptions
The points lying on the border of the polygon are considering to be inside the polygon
How many of the triangles below enclose the origin within their perimeter?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|