python-algorithm
Leetcode 1662. Check If Two String Arrays are Equivalent
무적김두칠
2021. 8. 17. 17:04
1
2
3
4
5
6
7
|
class Solution:
def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> bool:
tmp1,tmp2="",""
for i in word1: tmp1+=i
for i in word2: tmp2+=i
if tmp1==tmp2: return True
else: return False
|
cs |
반응형