내용 |
Merge Strings
Complete the mergeStrings function in your editor. It has 2 parameters
1. A string, a.
2. A string, b.
Your function must merge strings a and b, and then return a string merged string. A merge operation on two strings is desribed as follow:
. Append alternating characters form a and b, respectively, to some new stirng, mergeStrings.
. Once all of the characters in one of the strings have been merged, append the remaining characters in the other string to mergeStrings.
Input Format
The locked stub code in your editor reads two stirngs, a and b, from stdin and passes them to your function.
Constraints
. 1<= |a|, |b| <= 25000
Output Format
Your function must return the merged string. This will be printed to stdout by the locked stub code in your editor.
Sample Input 1
abc
def
Sample Output 1
adbecf
Sample Input 2
ab
zsd
Sample Output 2
azbsd |