Pergunta de entrevista da empresa Safeway

write an algorithm to reverse an existing string.