Python 1-liner. Functional programming.
Approach\nTL;DR, Similar to Editorial solution Approach 2 but shorter and functional.\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n), incl
# Approach\nTL;DR, Similar to [Editorial solution Approach 2](https://leetcode.com/problems/find-the-original-array-of-prefix-xor/editorial/?envType=daily-question&envId=2023-10-31) but shorter and functional.\n\n# Complexity\n- Time complexity: $$O(n)$$\n\n- Space complexity: $$O(n)$$, including the output else $$O(1)$$\n\nwhere,\n`n is length of pref array`.\n\n# Code\n```python\nclass Solution:\n    def findArray(self, pref: list[int]) -> list[int]:\n        return list(starmap(xor, pairwise(chain((0,), pref))))\n\n\n```
['Array', 'Bit Manipulation', 'Python', 'Python3']