Skip to content

Commit

Permalink
1768
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Feb 5, 2022
1 parent a449d06 commit daf4b9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions E_1768_MergeStringsAlternately.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Solution:
def mergeAlternately(self, word1: str, word2: str) -> str:
res=''
for i in range(min(len(word1),len(word2))):
res += word1[i] + word2[i]

return res + word1[i+1:] + word2[i+1:]

0 comments on commit daf4b9b

Please sign in to comment.