NEC Corporation interview question

reverse string