Easy solution
IntuitionEach element in the original array can be derived using the property:
a[i]=pref[i]⊕pref[i−1]
where the first element remains the same.ApproachInitializ
# Intuition
Each element in the original array can be derived using the property:
a[i]=pref[i]⊕pref[i−1]
where the first element remains the same.

# Approach
Initialize a with pref[0].
Iterate from i = 1 to len(pref) - 1 and compute:
a[i]=pref[i]⊕pref[i−1]
Return a.

# Complexity
- Time complexity:
O(n)

- Space complexity:
O(n)

# Code
```python3 []
class Solution:
    def findArray(self, pref: List[int]) -> List[int]:
        a=[]
        a.append(pref[0])
        for i in range(1,len(pref)):
            a.append(pref[i-1]^pref[i])
        return a


```
['Array', 'Python3']