- Normal questions about difference between pointers and variables in C, and how to access them;
- Also int p**;
- Also pointer to function;
- What is the difference between a Shared Pointer and a Unique Pointer? (Shared Pointers);
- Difference between Struct and Class in Cpp;
-
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 pointsSolution: Divide And Conquer
https://www.geeksforgeeks.org/closest-pair-of-points-using-divide-and-conquer-algorithm/
Comments (0)


