Siemens interview question

Pseudo code on reverse of string