For this Question: Given a set of positive integers. Find the maximum xor of a non-empty subset from the given set.The first line contains an integer N denoting the number of elements in the set.
The next line contains N integers denoting the elements of the set.

1 <= N <= 10^5
1 <= Elements of set <= 10^9Print the maximum subset Xor.Sample Input:
3
2 4 5

Sample Output:
7

Explanation:
Subset {2, 5} has the maximum xor

Sample Input:
3
9 8 5

Sample Output:
13

Explanation:
Subset {8, 5} has the maximum xor, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	static final int INT_BITS = 32;
	static int findMaxxor(int[] arr, int n){


    int index = 0;





    for (int i = INT_BITS - 1; i >= 0; i--)
    {



    int maxInd = index;
    int maxEle = Integer.MIN_VALUE;
    for (int j = index; j < n; j++) {




        if ((arr[j] & (1 << i)) != 0 && arr[j] > maxEle)
        {
        maxEle = arr[j];
        maxInd = j;
        }
    }





    if (maxEle == -2147483648)
        continue;




    int temp = arr[index];
    arr[index] = arr[maxInd];
    arr[maxInd] = temp;



    maxInd = index;




    for (int j = 0; j < n; j++) {




        if (j != maxInd && (arr[j] & (1 << i)) != 0)
        arr[j] = arr[j] ^ arr[maxInd];
    }



    index++;
    }



    int res = 0;
    for (int i = 0; i < n; i++)
    res ^= arr[i];

    return res;
	}
	public static void main (String[] args) throws Exception{
        InputStreamReader r=new InputStreamReader(System.in);
        BufferedReader br=new BufferedReader(r);
		int n = Integer.parseInt(br.readLine());
		String[] sval = br.readLine().split(" ");
		int[] arr = new int[n];
		for(int i=0;i<n;i++)
			arr[i]=Integer.parseInt(sval[i]);

		System.out.print(findMaxxor(arr,n));
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?