one test case giving wrong answer,what should i change?
i guess it is for test case 8 1 2 12
Maximum xor subarray
You are not computing the xor of the subarray. In the last loop you are simply checking the values of map ‘m’ which simply contains the frequency. You can simply build prefix xor array and save them in a set and for each entry check by taking xor with which value we can get the maximum xor and take maximum of those things.
i have got what changes are to be made but i am unable to implement it in code,could you help me with the code?https://ide.codingblocks.com/s/163395 LINK TO THE CODE I AM TRYING TO DO CHANGES IN LINE 66
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.