Returns XOR of arr [ 0. . index ] . This function assumes that the array is preprocessed and partial XORs of array elements are stored in BITree [ ] .
int getXOR ( int BITree [ ] , int index ) { int ans = 0 ; index += 1 ;