Pergunta de entrevista da empresa Accenture

Can you write a logic of String of Array of similar data in another array?