Algotec interview question

reverse a string