当前位置:网站首页>LeetCode 1720.解码异或后的数组(简单)
LeetCode 1720.解码异或后的数组(简单)
2022-08-10 05:32:00 【生信研究猿】
python
class Solution:
def decode(self, encoded: List[int], first: int) -> List[int]:
arr = []
arr.append(first)
for i in range(1,len(encoded)+1):
arr.append(encoded[i-1]^first)
first = arr[i]
return arr
边栏推荐
猜你喜欢
随机推荐
网络安全之防火墙
力扣——统计只差一个字符的子串数目
Multi-table query Notes
Knowledge Distillation Thesis Learning
Reflection 【Notes】
链表API设计
小程序wx.request简单Promise封装
Collection工具类
优先队列
你不知道的常规流
wiki confluence installation
impdp 导入数据
测一测异性的你长什么样?
转载fstream,ifstream的详细用法
各个架构指令集对应的机型
Collection set interface
微信小程序--模板与设置WXML
大端以及小端以及读寄存器习惯
win12 modify dns script
符号表