one-pass || EASY TO UNDERSTAND || SHORT & SWEET || C++
\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        int a = pref[0],b=pref[0];\n        for(int i = 1; i < pref.size(); i++){\n
````\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        int a = pref[0],b=pref[0];\n        for(int i = 1; i < pref.size(); i++){\n            a = pref[i];\n            pref[i] = (pref[i]^b);\n            b = a;\n        }\n        return pref;\n    }\n};\n````
['Bit Manipulation', 'C', 'C++']