Comment by ojr
it wasn't just euclidean distance of course, it was this leetcode problem k closest points to origin https://leetcode.com/problems/k-closest-points-to-origin/des..., I thought if I needed a heap I would have to implement it myself didn't know I can use a library
I.e. the nearest neighbor problem. Presumably seeing if the candidate gave a naive solution and was able to optimize or find a more ideal solution