Wrong Answer : maximum xor subarray

My one test case is not passing.
The approach I used was not TRIE BASED.
Rather I went for KADEN’S ALGO like it was used to calculate the max sum subarray . Kindly have a look at the code.

kadane will fails some test cases
e.g
4
0 4 1 6
ur code o/p is 6
BUT
1 XOR 6 = 7

try to find out the reason on the net
it is given there
i can’t explain better than them
so try to search it

hope this will help u

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.