Problems / Heap / Priority Queue / K Closest Points to Origin
#66 Medium Time O(n log k) Space O(k) Animated

K Closest Points to Origin

Find the k closest points to origin.

LeetCode ↗
Approach: Min-Heap
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps