Simple c++ O(n) solution || Beats others
\n\n# Code\n\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        vector<int>org;\n        org.push_back(pref[0]);\n        for(i
\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        vector<int>org;\n        org.push_back(pref[0]);\n        for(int i=1;i<pref.size();i++){\n            org.push_back(pref[i]^pref[i-1]);\n        }\n        return org;\n        \n    }\n};\n```
['C++']