File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 33import java .util .Arrays ;
44import java .util .PriorityQueue ;
55
6- /**
7- * 719. Find K-th Smallest Pair Distance
8- *
9- * Given an integer array, return the k-th smallest distance among all the pairs.
10- * The distance of a pair (A, B) is defined as the absolute difference between A and B.
11-
12- Example 1:
13- Input:
14- nums = [1,3,1]
15- k = 1
16- Output: 0
17- Explanation:
18- Here are all the pairs:
19- (1,3) -> 2
20- (1,1) -> 0
21- (3,1) -> 2
22- Then the 1st smallest distance pair is (1,1), and its distance is 0.
23-
24- Note:
25- 2 <= len(nums) <= 10000.
26- 0 <= nums[i] < 1000000.
27- 1 <= k <= len(nums) * (len(nums) - 1) / 2.
28- */
29-
306public class _719 {
317 public static class Solution1 {
328 /**
You can’t perform that action at this time.
0 commit comments