100% Beat || Java code || small and super easy
Complexity
Time complexity: O(n)

Space complexity: O(1)
Code
# Complexity
- Time complexity: O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int[] findArray(int[] pref) {
        for(int i=pref.length-1;i>0;i--)
        {
            pref[i] ^= pref[i-1];
        }
        return pref;  
    }
}
```
['Java']