Pergunta de entrevista da empresa Microsoft

You have two substrings of a string that overlap. How would you put them together into one string?