C++ Solution
Complexity\n- Time complexity:\n Add your time complexity here, e.g. O(n) \n    O(N)\n\n- Space complexity:\n Add your space complexity here, e.g. O(n) \n    O(
# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n    O(N)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(N)\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        int n = pref.size();\n        vector<int> ans;\n        ans.push_back(pref[0]);\n        for (int i = 1; i < n; i++) {\n            ans.push_back(pref[i] ^ pref[i - 1]);\n        }\n        return ans;\n    }\n};\n```
['C++']