Given a list of points on a 2D plane, find the K closest points to the origin (0, 0). There can be multiple Solutions, Give any solution out of multiple solutions
{
"points": [
[
1,
3
],
[
-2,
2
]
],
"k": 1
}[
[
-2,
2
]
]{
"points": [
[
3,
3
],
[
5,
-1
],
[
-2,
4
]
],
"k": 2
}[
[
3,
3
],
[
-2,
4
]
]{
"points": [
[
1,
1
],
[
2,
2
],
[
3,
3
]
],
"k": 1
}[
[
1,
1
]
]Sign in to Run Code and Submit