Amazon interview question

reverse a string in one place.