Pergunta de entrevista da empresa Google

Take a string and modify it to their needs, in my case i needed to join two strings and remove empty space.