Build the PrimitiveMedium
K Closest Points to Origin
Write `k_closest(points, k)` returning the k points closest to the origin, in any order. Each point is a two-element list.
k_closest([[1,3],[-2,2]], 1) -> [[-2,2]]
Never call `sqrt`: it costs time and introduces floating point into a comparison that works perfectly on squared distances. Sorting is O(n log n), a size-k heap is O(n log k), and quickselect is O(n) on average — name at least two.
What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.