Question: Consider a set of n points Points given as a list of tuples, where each tuple represents a point in a 2 dimensional space

Consider a set of n points Points given as a list of tuples, where each tuple represents a point in a 2 dimensional space with first element of tuple as x-coordinate and second element as y- coordinate. Write a Python function minDistance(Points) that returns the distance (rounded to 2 decimal places) between the closest pair of points (pi, pj), in the set of points Points. n >= 2 No two points have same x coordinate. No two points have same y coordinate. Solution should run in O(n log n) time. Sample Input 1 [(2, 15), (40, 5), (20, 1), (21, 14), (1,3), (3, 11)] Sample Output 1 4.12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
