2 Solution, one liner & beginner friendly
\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n      \n      // beginner friendly\n      \n      vector<int>ans;\n      ans.push_b
```\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n      \n      // beginner friendly\n      \n      vector<int>ans;\n      ans.push_back(pref[0]);\n      int xr = pref[0];\n      for(int i = 1 ; i < pref.size() ; i++) {\n        xr = pref[i]^pref[i-1];\n        pref[i] = xr;\n      }\n      return ans;\n      \n      // one liner\n      \n      for (int i = pref.size() - 1; i > 0; --i) pref[i] = pref[i]^pref[i - 1];\n      return pref;\n    }\n};\n```
['C']