Decode XOR Array

A hidden array was encoded by XORing each adjacent pair: encoded[i] = arr[i] ^ arr[i + 1]. Given the encoded array and the value of the first element, reconstruct and return the original array.

Examples
Input: [[1,2,3],1]
Output: [1,0,2,1]
Hints

Decode XOR Array

A hidden array was encoded by XORing each adjacent pair: `encoded[i] = arr[i] ^ arr[i + 1]`. Given the encoded array and the value of the first element, reconstruct and return the original array.