We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc8308b commit 64034c4Copy full SHA for 64034c4
README.md
@@ -45,6 +45,8 @@ Step 2. Add the dependency
45
46
<summary>展开查看</summary>
47
48
+https://leetcode.cn/problems/find-the-original-array-of-prefix-xor/
49
+
50
https://leetcode.cn/problems/U7WvvU/
51
52
https://leetcode.cn/problems/KnLfVT/
find-the-original-array-of-prefix-xor/index.ts
@@ -0,0 +1,3 @@
1
+export default function findArray(pref: number[]): number[] {
2
+ return pref.map((v, i, a) => i === 0 ? v : v ^ a[i - 1]);
3
+}
0 commit comments