Pergunta de entrevista da empresa Infosys

Programming question on strings and swapping