Given three coordinate points A, B and C, find the missing point D such that ABCD can be a parallelogram. If there are multiple such points, find the lexicographically smallest coordinate.
A = (3, 2)
B = (3, 4)
c = (2, 2)
Explanation: There are two options for
point D : (2, 4) and (2, 0) such that ABCD
forms a parallelogram. Since (2, 0) is
lexicographically smaller than (2, 4). Hence,
(2, 0) is the answer.
You don't need to read input or print anything. Your task is to complete the function findPoint() which takes three list of integers A, B and C and return D list of two numbers with a precision of 6 decimal places where first element of D[ ] denote x coordinate and second element of D[ ] denote y coordinate.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
1 ≤ x, y ≤ 1000 , where x and y denote coordinates of points A, B and C.