Pergunta de entrevista da empresa PTC

Reverse a string, swap two integers without using a third variable, count the frequency of each letter in a string.