Skip to content

Commit 573b62b

Browse files
committed
feat: add typescript solution to lc problem: No.1662.Check If Two String Arrays are Equivalent
1 parent 007c536 commit 573b62b

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

solution/1600-1699/1662.Check If Two String Arrays are Equivalent/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ class Solution {
8787
}
8888
```
8989

90+
### **TypeScript**
91+
92+
```ts
93+
function arrayStringsAreEqual(word1: string[], word2: string[]): boolean {
94+
let s1 = word1.join(''), s2 = word2.join('');
95+
return s1 == s2;
96+
};
97+
```
98+
9099
### **...**
91100

92101
```

solution/1600-1699/1662.Check If Two String Arrays are Equivalent/README_EN.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ class Solution {
7575
}
7676
```
7777

78+
### **TypeScript**
79+
80+
```ts
81+
function arrayStringsAreEqual(word1: string[], word2: string[]): boolean {
82+
let s1 = word1.join(''), s2 = word2.join('');
83+
return s1 == s2;
84+
};
85+
```
86+
7887
### **...**
7988

8089
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function arrayStringsAreEqual(word1: string[], word2: string[]): boolean {
2+
let s1 = word1.join(''), s2 = word2.join('');
3+
return s1 == s2;
4+
};

0 commit comments

Comments
 (0)