Back to problems

Alternating String Merge

Algorithm · Cisco · Easy

Requirements Read strA from the first input line. Read strB from the second input line. Build a new string by taking characters alternately from strA and strB. If either string runs out first, add the rest of the other string afterward. The stated length constraint is 1 <= length(strA), length(strB) <= 25000. The inputs contain neither special characters nor uppercase letters. Examples Input: Output: Explanation: Alternating characters produces azbs; the leftover d is then…

Checking your access…