ECON interview question

reverse the string