class Solution:
def decode(self, encoded: List[int], first: int) -> List[int]:
thisNum = first
for i in range(len(encoded)):
nextNum = encoded[i]^thisNum
encoded[i] = thisNum
thisNum = nextNum
encoded.append(nextNum)
return encoded
位运算 简单 每日一题
https://leetcode-cn.com/problems/decode-xored-array/