Sponsored
Use these hints if you're stuck. Try solving on your own first.
Consider the following equation: x ^ a = b. How can you find x?
Notice that arr[i] ^ pref[i-1] = pref[i]. This is the same as the previous equation.
Solve with full IDE support and test cases