Pergunta de entrevista da empresa Accenture

Coding question on strings and arrays