Amazon Interview Question

reverse a string in one place.