Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 2 , 5 , 4 , 1 , 3 , 7 , 6 , 8 } ; int n = arr . length ; int k = 3 ; for ( int i = 0 ; i < MAX_ELEMENT ; i ++ ) { for ( int j = 0 ; j < MAX_ELEMENT ; j ++ ) { for ( int l = 0 ; l < MAX ; l ++ ) dp [ i ] [ j ] [ l ] = - 1 ; } } System . out . println ( Max_Xor ( arr , 0 , k , 0 , n ) ) ; } }