#973

K Closest Points to Origin

medium· Heap / Priority Queueruns: 0

Given an array points where points[i] = [xi, yi] represents a point on the X-Y plane, and an integer k, return the k closest points to the origin (0, 0). The distance between two points is the Euclidean distance.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.