Pergunta de entrevista da empresa Qualcomm

Write a function that reverses a string in constant space complexity.