Input: points = [[3, 3], [5, -1], [-2, 4]], target = [0, 0], K = 2
Output: [[3, 3], [-2, 4]]
Explanation: Square of Distance of target(=origin) from this point is
(3, 3) = 18
(5, -1) = 26
(-2, 4) = 20
So the closest two points are [3, 3], [-2, 4].
Input: points = [[1, 3], [-2, 2]], target = [0, 1], K = 1
Output: [[1, 3]]
Below is the implementation of above approach.