First Code Question:
Given four integers x1, y1, x2 and y2. These represents two coordinates (x1, y1) and (x2, y2) of a two-dimensional graph. Write a C or C++ function to calculate the distance between 2 points.
Using this method you just coded, now do this one:
Given 10 points, write a C or C++ program to find the closest two points.
Return the distance and the two points
Solution: Divide And Conquer
https://www.geeksforgeeks.org/closest-pair-of-points-using-divide-and-conquer-algorithm/