OCV interview question

Write a string reverse algorithm.