Problem 973 · Medium

K Closest Points to Origin

Select the k points that lie closest to the origin from a list of coordinates. The visual plots the points and a distance circle that shrinks around the chosen ones.

Open the interactive visualisation