C++ Simple and easiest approach 3  line code
\nvector findArray(vector& pref) {\n        \n        vectorans;\n        ans.push_back(pref[0]);\n        for(int i = 0 ; i < pref.size()-1 ;i++){\n           
\nvector<int> findArray(vector<int>& pref) {\n        \n        vector<int>ans;\n        ans.push_back(pref[0]);\n        for(int i = 0 ; i < pref.size()-1 ;i++){\n            int yes = pref[i] xor pref[i+1];\n            ans.push_back(yes);\n        }\n        return\xA0ans;\n\xA0\xA0\xA0\xA0}
['C']