Search
⌘K
Get Premium
Leetcode 1385. Find the Distance Value Between Two Arrays
Count how many elements in arr1 have no element in arr2 within distance d (i.e., for which every |arr1[i] - arr2[j]| > d). Arrays are small (<=500), so this reduces to checking each arr1 value against all arr2 values (or faster via sorting + binary search).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.