File tree 2 files changed +21
-1
lines changed 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 1
- # 1,457 LeetCode solutions in JavaScript
1
+ # 1,458 LeetCode solutions in JavaScript
2
2
3
3
[ https://leetcodejavascript.com ] ( https://leetcodejavascript.com )
4
4
1280
1280
1657|[ Determine if Two Strings Are Close] ( ./solutions/1657-determine-if-two-strings-are-close.js ) |Medium|
1281
1281
1658|[ Minimum Operations to Reduce X to Zero] ( ./solutions/1658-minimum-operations-to-reduce-x-to-zero.js ) |Medium|
1282
1282
1659|[ Maximize Grid Happiness] ( ./solutions/1659-maximize-grid-happiness.js ) |Hard|
1283
+ 1662|[ Check If Two String Arrays are Equivalent] ( ./solutions/1662-check-if-two-string-arrays-are-equivalent.js ) |Easy|
1283
1284
1668|[ Maximum Repeating Substring] ( ./solutions/1668-maximum-repeating-substring.js ) |Easy|
1284
1285
1669|[ Merge In Between Linked Lists] ( ./solutions/1669-merge-in-between-linked-lists.js ) |Medium|
1285
1286
1672|[ Richest Customer Wealth] ( ./solutions/1672-richest-customer-wealth.js ) |Easy|
Original file line number Diff line number Diff line change
1
+ /**
2
+ * 1662. Check If Two String Arrays are Equivalent
3
+ * https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/
4
+ * Difficulty: Easy
5
+ *
6
+ * Given two string arrays word1 and word2, return true if the two arrays represent the same
7
+ * string, and false otherwise.
8
+ *
9
+ * A string is represented by an array if the array elements concatenated in order forms the string.
10
+ */
11
+
12
+ /**
13
+ * @param {string[] } word1
14
+ * @param {string[] } word2
15
+ * @return {boolean }
16
+ */
17
+ var arrayStringsAreEqual = function ( word1 , word2 ) {
18
+ return word1 . join ( '' ) === word2 . join ( '' ) ;
19
+ } ;
You can’t perform that action at this time.
0 commit comments