There is an integer array perm that represents a permutation of the first
This array was transformed into an integer array encoded of length encoded[i] = perm[i] XOR perm[i + 1] for each
Given the array encoded, reconstruct and return the original array perm. It is guaranteed that the answer exists and is unique.
Constraints:
encoded.length
There is an integer array perm that represents a permutation of the first
This array was transformed into an integer array encoded of length encoded[i] = perm[i] XOR perm[i + 1] for each
Given the array encoded, reconstruct and return the original array perm. It is guaranteed that the answer exists and is unique.
Constraints:
encoded.length