Java | 2ms beats 100%
Simple observation:\n\nIf c = a^b then we know a = b^c\n5 ^ 2 = 7 can be written as 5 = 7 ^ 2\n5 ^ 7 = 2 can be written as 7 = 2 ^ 5\nBasic maths LHS = RHS\n\n\
Simple observation:\n\nIf c = a^b then we know a = b^c\n5 ^ 2 = 7 can be written as 5 = 7 ^ 2\n5 ^ 7 = 2 can be written as 7 = 2 ^ 5\nBasic maths LHS = RHS\n\n```\nclass Solution {\n    public int[] findArray(int[] pref) {\n        int xor = pref[0];\n        for(int i = 1;i<pref.length;i++)\n        {\n            int temp = xor ^ pref[i];\n            xor = pref[i];\n            pref[i] = temp;\n        }\n        return pref;\n    }\n}\n```
['Bit Manipulation', 'Java']