There is a hidden integer array arr containing encoded of length encoded[i] = arr[i] ^ arr[i + 1] for all valid indices
Given the integer array encoded and an integer first representing the initial element arr[0], reconstruct and return the original array arr.
Constraints:
encoded.length
encoded[i]
first
There is a hidden integer array arr containing encoded of length encoded[i] = arr[i] ^ arr[i + 1] for all valid indices
Given the integer array encoded and an integer first representing the initial element arr[0], reconstruct and return the original array arr.
Constraints:
encoded.length
encoded[i]
first