Fortinet interview question

Reverse a string