Skip to content

Commit

Permalink
feat: add ts solution to lc problem: No.2683 (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkasany authored Aug 15, 2023
1 parent 1065a0c commit 1d8987c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions solution/2600-2699/2683.Neighboring Bitwise XOR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ function doesValidArrayExist(derived: number[]): boolean {
}
```

```ts
function doesValidArrayExist(derived: number[]): boolean {
return derived.reduce((acc, x) => acc ^ x, 0) === 0;
}
```

### **...**

```
Expand Down
6 changes: 6 additions & 0 deletions solution/2600-2699/2683.Neighboring Bitwise XOR/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ function doesValidArrayExist(derived: number[]): boolean {
}
```

```ts
function doesValidArrayExist(derived: number[]): boolean {
return derived.reduce((acc, x) => acc ^ x, 0) === 0;
}
```

### **...**

```
Expand Down

0 comments on commit 1d8987c

Please sign in to comment.