반응형
오늘 풀 문제는 Check If Two String Arrays are Equivalent라는 문제이며
링크는 leetcode.com/problems/check-if-two-string-arrays-are-equivalent/입니다
Check If Two String Arrays are Equivalent - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
이 문제는 두 배열이 같은 알파벳 문자열을 가지고 있는지 체크하는 문제였습니다
두 배열을 그냥 다 붙여서 체크하면 되는 문제였습니다
import (
"strings"
)
func arrayStringsAreEqual(word1 []string, word2 []string) bool {
return strings.Join(word1, "") == strings.Join(word2, "")
}
'Language > Go' 카테고리의 다른 글
[Golang으로 도전하는 Leetcode] Smallest String With A Given Numeric Value (0) | 2020.12.02 |
---|---|
[Golang으로 도전하는 Leetcode] Ways to Make a Fair Array (0) | 2020.11.30 |
[Golang으로 도전하는 Leetcode] All Elements in Two Binary Search Trees (0) | 2020.09.07 |
[Golang으로 도전하는 Leetcode] Partition Labels (0) | 2020.09.05 |
[Golang으로 도전하는 Leetcode] Repeated Substring Pattern (0) | 2020.09.04 |