leetcode.cn 2026-11-05
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
find-the-distance-value-between-two-arrays
给你两个整数数组 arr1 , arr2 和一个整数 d ,请你返回两个数组之间的 距离值 。 「距离值」 定义为符合此距离要求的元素数目:对于元素 arr1[i] ,不存在任何元素 arr2[j] 满足 |arr1[i]-arr2[j]| <= d 。 示例 1: 输入:arr1 = [4,5,8], arr2 = [10,9,1,8], d = 2 输出:2 解释: 对于 arr1[0]=4 我们有: |4-10|=6 > d=2 |4-9|=5 > d=2 |4-1|=3 > d=2 |4-8|=4…
leetcode.com 2026-11-05
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
🟢1385.find-the-distance-value-between-two-arrays
🏷️ Tags
#array #two_pointers #binary_search #sorting
Telegraph
find-the-distance-value-between-two-arrays
Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The distance value is defined as the number of elements arr1[i] such that there is not any element arr2[j] where |arr1[i]-arr2[j]| <= d. Example…