Skip to content

Commit ff5c660

Browse files
AE-Hertzidoocs
authored andcommitted
style: format code and docs with prettier
1 parent d2dd3ab commit ff5c660

File tree

1 file changed

+4
-3
lines changed
  • solution/0700-0799/0719.Find K-th Smallest Pair Distance

1 file changed

+4
-3
lines changed

solution/0700-0799/0719.Find K-th Smallest Pair Distance/Solution.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
* @return {number}
55
*/
66
function smallestDistancePair(nums, k) {
7-
nums.sort((a, b) => a - b);
7+
nums.sort((a, b) => a - b);
88
const n = nums.length;
99
let left = 0,
10-
right = nums[n - 1] - nums[0];
10+
right = nums[n - 1] - nums[0];
1111

1212
while (left < right) {
1313
let mid = Math.floor((left + right) / 2);
14-
let count = 0, i = 0;
14+
let count = 0,
15+
i = 0;
1516

1617
for (let j = 0; j < n; j++) {
1718
while (nums[j] - nums[i] > mid) {

0 commit comments

Comments
 (0)