Amazon interview question

Reverse a string