Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
K Closest Points to Origin
Bookmark
Input
Small (k=2)
Medium (k=3)
Two points (k=1)
Equal distance
Custom
points
=
[[1,3],[-2,2],[5,8],[0,1],[-3,-1]]
,
k
=
2
[1,3]
[-2,2]
[5,8]
[0,1]
[-3,-1]
algo
master
.
io
Step:
Start: Initialize algorithm
0 / 15
Input
Small (k=2)
Medium (k=3)
Two points (k=1)
Equal distance
Custom
points
=
[[1,3],[-2,2],[5,8],[0,1],[-3,-1]]
,
k
=
2
0 / 15
[1,3]
[-2,2]
[5,8]
[0,1]
[-3,-1]
algo
master
.
io
Step:
Start: Initialize algorithm