Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8f1ba03

Browse files
committed
Add solution #1662
1 parent d5243c0 commit 8f1ba03

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1,457 LeetCode solutions in JavaScript
1+
# 1,458 LeetCode solutions in JavaScript
22

33
[https://leetcodejavascript.com](https://leetcodejavascript.com)
44

@@ -1280,6 +1280,7 @@
12801280
1657|[Determine if Two Strings Are Close](./solutions/1657-determine-if-two-strings-are-close.js)|Medium|
12811281
1658|[Minimum Operations to Reduce X to Zero](./solutions/1658-minimum-operations-to-reduce-x-to-zero.js)|Medium|
12821282
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|
12831284
1668|[Maximum Repeating Substring](./solutions/1668-maximum-repeating-substring.js)|Easy|
12841285
1669|[Merge In Between Linked Lists](./solutions/1669-merge-in-between-linked-lists.js)|Medium|
12851286
1672|[Richest Customer Wealth](./solutions/1672-richest-customer-wealth.js)|Easy|
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
};

0 commit comments

Comments
 (0)