Beginner friendly [Java/JavaScript/Python] Solution
Java\n\nclass Solution {\n    public int[] findArray(int[] pref) {\n        int xor = pref[0];\n        for(int i=1; i<pref.length; i++){\n            pref[i] ^
**Java**\n```\nclass Solution {\n    public int[] findArray(int[] pref) {\n        int xor = pref[0];\n        for(int i=1; i<pref.length; i++){\n            pref[i] ^= xor;\n            xor ^= pref[i];\n        }\n        return pref;\n    }\n}\n```\n**JavaScript**\n```\nvar findArray = function(pref) {\n    let xor = pref[0];\n    for(let i=1; i<pref.length; i++){\n        pref[i] ^= xor;\n        xor ^= pref[i];\n    }\n    return pref;\n};\n```\n**Python**\n```\nclass Solution(object):\n    def findArray(self, pref):\n        xor = pref[0]\n        for i in range(1,len(pref)):\n            pref[i] ^= xor\n            xor ^= pref[i]\n        return pref\n```
['Python', 'Java', 'JavaScript']