Pick the k points with smallest squared distance to the origin.
Use a heap helper to select k smallest by key x^2 + y^2 (no need for square root).
Squared distance preserves ordering and heap selection returns the k closest.
Pick the k points with smallest squared distance to the origin.
Use a heap helper to select k smallest by key x^2 + y^2 (no need for square root).
Squared distance preserves ordering and heap selection returns the k closest.