easy solution c++ 
IntuitionApproachComplexity
Time complexity:
O(N)

Space complexity:
o(N)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
- O(N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
- o(N)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    vector<int> findArray(vector<int>& pref) {
        int n=pref.size();
        vector<int> ans( n , 0 );
        if (n==0) return {};
        ans[0]=pref[0];

        for (int i=1; i<n;i++){
            ans[i]=pref[i-1]^pref[i];
        }
        return ans;
        
    }
};
```
['C++']