PRATT and WHITNEY Hiring Challenge | Online Assessment Question | On-Campus(2023)

Question · Posted Jun 2026

Problem: Find the Distance Value Between Two Arrays Problem Statement Given two integer arrays arr1 and arr2, and an integer d, return the number of elements in arr1 such that for every element in arr2: |arr1[i] - arr2[j]| > d Example Input arr1 = [4,5,8] arr2 = [10,9,1,8] d = 2 Output 2 Explanation 4 is valid. 5 is valid. 8 is not valid because |8−8| = 0 ≤ 2. Hence, the answer is 2. Test Cases Test Case 1 ...

The full answer & interview discussion are available to premium members.

Log in Create a free account