Problem in short : Find sum of XOR of all subarrays of size>1 in the given array of size n in linear time.
My idea is to get the prefix sum array of XORs and now the problem is reduced to finding XOR between all possible pairs in prefix XOR array.
I tried for hours to debug the code but couldn't figure out what did I do wrong. Any help would be greatly appreciated.
UPD :
Thanks srinivas1999 xQConqueror vaibhav2740