Siemens interview question

The question was reversing a string.