1385. Find the Distance Value Between Two Arrays
Easy
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 1:
Example 2:
Example 3:
Constraints:
1 <= arr1.length, arr2.length <= 500
-1000 <= arr1[i], arr2[j] <= 1000
0 <= d <= 100
解題
暴力解
Last updated