PwC interview question

Asked me to write code to reverse string