IBM interview question

DSA question Reverse the String