Qualcomm C++
Anonymous User
140
  1. Normal questions about difference between pointers and variables in C, and how to access them;
    1. Also int p**;
    2. Also pointer to function;
  2. What is the difference between a Shared Pointer and a Unique Pointer? (Shared Pointers);
  3. Difference between Struct and Class in Cpp;

  1. 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.

  2. 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/

Comments (0)