NeetCode #531LC-973MediumHeap / Priority QueueNC 150NC 250
← Back to All Problems

#531 · #973 · K Closest Points to Origin(最接近原点的 K 个点)

📌 Problem Statement & Constraints

Given an array of points and an integer k, return the k closest points to the origin, in any order. Constraints: 1 <= k <= points.length <= 10^4, -10^4 <= x, y <= 10^4.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!