Terawe interview question

Reverse string