Siemens Interview Question

The question was reversing a string.