Citi interview question

Reverse string