NeetCode #298LC-719HardBinary Search
← Back to All Problems#298 · #719 · Find K-th Smallest Pair Distance(找出第 K 小的数对距离)
📌 Problem Statement & Constraints
Given an integer array
nums and an integer k, return the k-th smallest distance among all pairs. The distance between a pair is the absolute difference of the two values. Constraints: 2 <= nums.length <= 10^4, 0 <= nums[i] <= 10^6, 1 <= k <= nums.length * (nums.length - 1) / 2.🔒
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!