Max xor subarray


why it is not passing all test cases

hello @tishya_goyal
u need to main xor of prefixes.
check ur updated code.
inserted(0) before applying algorithm to handle the case where all the elements are selected.
check ur updated code->

still facing same issue…

it is working from my side
image

make sure u intialise ur left and right with null inside constructor.

okay…i got my mistake

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.