Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Find the City With the Smallest Number of Neighbors at a Threshold Distance
Coding
- Find Distance in a Binary Tree
Coding
- Find K Pairs with Smallest Sums
Coding · Array · Heap (Priority Queue)
- Find Lexicographically Smallest Permutation Maximizing Information Gain
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 719. Find K-th Smallest Pair Distance
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source