
[LeetCode] 1768. Merge Strings Alternately
·
코딩테스트/Python
🔗 Problem Linkhttps://leetcode.com/problems/merge-strings-alternately/description/❔Thinkingword1, word2 두 단어가 주어질 때, 두 단어의 각 글자를 번갈아 합친 단어를 반환한다.길이가 다르다면, 남은 길이의 단어는 그대로 붙인다.Input: word1 = "abc", word2 = "pqr"Output: "apbqcr"Explanation: The merged string will be merged as so:word1: a b cword2: p q rmerged: a p b q c r💻Solution1. stack을 활용한 풀이class Solution: def mergeAlternately..