Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 719. Find K-th Smallest Pair Distance
Given an array nums, return the k-th smallest absolute difference among all pairs nums[i], nums[j] (i < j). Typical efficient approach (needed for n up to 10^4) is to sort and binary-search the distance value while using a two-pointer/sliding-window to count how many pairs have difference ≤ mid.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.