当前位置:网站首页>LeetCode 1720. Decoding XORed Arrays (Simple)
LeetCode 1720. Decoding XORed Arrays (Simple)
2022-08-10 05:55:00 【The study of surface letter ape】
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
边栏推荐
猜你喜欢
PyTorch之训练技巧
PyTorch之模型定义
LeetCode 剑指offer 21.调整数组顺序使奇数位于偶数前面(简单)
transaction, storage engine
21天挑战杯MySQL-Day05
LeetCode 1894.找到需要补充粉笔的学生编号
Machine Learning - Clustering - Shopping Mall Customer Clustering
Link reading good article: What is the difference between hot encrypted storage and cold encrypted storage?
泛型笔记()()()
LeetCode 292.Nim 游戏(简单)
随机推荐
视图【】【】【】【】
[Notes] Collection Framework System Collection
深度学习阶段性报告(一)
Multi-table query Notes
LeetCode 剑指offer 21.调整数组顺序使奇数位于偶数前面(简单)
pytorch-08.加载数据集
LeetCode 162.寻找峰值(中等)
ORACLE系统表空间SYSTEM占满无法扩充表空间问题解决过程
MySql constraints
Copy large files with crontab
卷积神经网络(CNN)实现mnist手写数字识别
LeetCode 94.二叉树的中序遍历(简单)
A little knowledge point every day
LeetCode 292.Nim 游戏(简单)
【笔记】集合框架体系 Collection
Reprint fstream, detailed usage of ifstream
PyTorch之CV
opencv
transaction, storage engine
最新最全的数字藏品发售日历-07.26