Sponsored
Use these hints if you're stuck. Try solving on your own first.
Note that the maximum possible XOR result is always 2^(maximumBit) - 1
So the answer for a prefix is the XOR of that prefix XORed with 2^(maximumBit)-1
Solve with full IDE support and test cases