Pergunta de entrevista da empresa HelloFresh

Write an algorithm to reverse a string.