1. You will be given points in space and its count
2. You will also be given an integeral value k
3. You need to find k closest points to the origin(0,0)
4. Return closest points as an array
5. Input and output is handled for you
6. It is a functional problem ,please do not modify main()
Input Format
Input is handled for you.
Output Format
Output is handled for you.
Constraints
Return closest point as array Distance to be calculated is Euclidean distance
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
aEe EedeaGdeGHg
Output
5