Subarray with maximum xor


In this code i solve the problem by precomputing the xor
in O(n^2) time complexity but i got incoorect output

Try this:

sir answer sahi nahi aa rha aapke coded se

https://ide.codingblocks.com/s/311051 this is correct now

Is ur issue resolved??

Sir the code you were sent output is 21 but correct output is 31
logic is correct

hello @Satyamcoder
image

that arr[i] should not be there.

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.