Practice
Learn
← Quit
0 / 0 correct
Algorithms
Hard
1 of 10
What's an efficient way to find 'K closest points to the origin' among n points?
A
A max-heap of size k (O(n log k)) or quickselect on distances (O(n) average)
B
Sort all points: the only correct method
C
BFS from the origin
D
Binary search on x