Find The Original Array of Prefix Xor (LeetCode 2433)
Asked in the Online test stage.
Given an integer array pref, where pref[i] equals arr[0] XOR arr[1] XOR ... XOR arr[i], reconstruct and return the original array arr.
Implement find_array(pref). The input is a non-empty list of integers, and the output must be a list of the same length.
def find_array(pref):