We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
给你两个字符串数组 word1 和 word2 。如果两个数组表示的字符串相同,返回 true ;否则,返回 false 。
数组表示的字符串 是由数组中的所有元素 按顺序 连接形成的字符串。
输入:word1 = ["ab", "c"], word2 = ["a", "bc"] 输出:true 解释: word1 表示的字符串为 "ab" + "c" -> "abc" word2 表示的字符串为 "a" + "bc" -> "abc" 两个字符串相同,返回 true
输入:word1 = ["a", "cb"], word2 = ["ab", "c"] 输出:false
输入:word1 = ["abc", "d", "defg"], word2 = ["abcddefg"] 输出:true
来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/check-if-two-string-arrays-are-equivalent 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
The text was updated successfully, but these errors were encountered:
第一次看到这么简单的周赛题
func arrayStringsAreEqual(word1 []string, word2 []string) bool { return strings.Join(word1, "") == strings.Join(word2, "") }
Sorry, something went wrong.
No branches or pull requests
给你两个字符串数组 word1 和 word2 。如果两个数组表示的字符串相同,返回 true ;否则,返回 false 。
数组表示的字符串 是由数组中的所有元素 按顺序 连接形成的字符串。
示例 1:
示例 2:
示例 3:
提示:
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/check-if-two-string-arrays-are-equivalent
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
The text was updated successfully, but these errors were encountered: