---
# System prepended metadata

title: 2433. Find The Original Array of Prefix Xor
tags: [Leetcode, Bit Manipulation, Prefix Sum, Medium]

---

# 2433. Find The Original Array of Prefix Xor
###### tags: `Leetcode` `Medium` `Bit Manipulation` `Prefix Sum`
Link: https://leetcode.com/problems/find-the-original-array-of-prefix-xor/
## Code
```java=
class Solution {
    public int[] findArray(int[] pref) {
        int n = pref.length;
        for(int i=n-1; i>=1; i--){
            pref[i] ^= pref[i-1];
        }
        return pref;
    }
}
```