For this Question: Given an integer array A of N integers, find the pair of integers in the array which have minimum XOR value. Report the minimum XOR value.First line denotes N, the size of the array.
Next line denotes N space-separated array elements.

Constraints:
2 <= N <= 100000
0 <= A[i] <= 10^7Print a single integer denoting minimum xor valueSample Input 
4
0 2 5 7

Sample Output
2

Explanation:
0 xor 2 = 2

Sample Input 
4
0 4 7 9

Sample Output 
3, I have written this Solution Code: #include <bits/stdc++.h> 
using namespace std; 

// Function to find minimum XOR pair 
int minXOR(int arr[], int n) 
{ 
	// Sort given array 
	sort(arr, arr + n); 

	int minXor = INT_MAX; 
	int val = 0; 

	// calculate min xor of consecutive pairs 
	for (int i = 0; i < n - 1; i++) { 
		val = arr[i] ^ arr[i + 1]; 
		minXor = min(minXor, val); 
	} 

	return minXor; 
} 

// Driver program 
int main() 
{   

	int n;
	cin>>n;
	int arr[n];
	for(int i=0;i<n;i++)
	{
		cin>>arr[i];
	}
	cout << minXOR(arr, n) << endl; 

	return 0; 
} 
, In this Programming Language: C++, Now tell me if this Code is compilable or not?