Beats 100% | Easy To Understand | 3 Lines of Code 🚀🚀
Intuition\n\n\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- T
# Intuition\n![Screenshot 2023-10-31 065202.png](https://assets.leetcode.com/users/images/5a122f59-aa2b-4408-b8ff-ee2d3db15d3a_1698715388.36294.png)\n\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findArray(vector<int>& pref) {\n        ios_base::sync_with_stdio(false);\n        cin.tie(0);\n        cout.tie(0);\n\n        int n = pref.size();\n        for(int i = n - 1; i >= 1;  i--)\n        {\n            pref[i] = (pref[i] ^ pref[i-1]);\n        }\n        return pref;\n    }\n};\n```
['Array', 'Bit Manipulation', 'C', 'Python', 'C++', 'Java', 'Python3', 'JavaScript']