Min Xor Pairs
easy
1. You are given an array of distinct integers. 2. You have to print all pairs of integers in the array whose XOR value is minimum.
Constraints
1 <= n <= 10^5 -10^9 <= arr[i] <= 10^9
Format
Input
A number N arr1 arr2.. N numbers
Output
Check the sample output and question video.
Example
Sample Input
4
2
0
5
7
Sample Output
0, 2
5, 7
Question Video