You are given an integer array pref of size n. Find and return the array arr of size n that satisfies:
Note that ^ denotes the bitwise-xor operation.
It can be proven that the answer is unique.
Input: pref = [13]
Output: [13]
Explanation: We have pref[0] = arr[0] = 13.
Constraints
1 <= pref.length <= 105
0 <= pref[i] <= 106
2433. Find The Original Array of Prefix Xor
Medium
30 Points
Array
Bit Manipulation
You are given an integer array pref of size n. Find and return the array arr of size n that satisfies:
Note that ^ denotes the bitwise-xor operation.
It can be proven that the answer is unique.