Find Pair With Given Difference
medium
1. Given an array arr of size n, you need to write a program to find if there exists a pair of elements in the array whose difference is equals to target. 2. If there exists such a pair print it, otherwise print -1.
Constraints
1 <= target <= 10^4 1 <= arr[i], n <= 10^5
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
6
5 2 3 80 5 20
78
Sample Output
2 80
Question Video