반응형

오늘 풀 문제는 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, "")
}

 

  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기