Reverse a string (given as a character array) in-place. Modify input directly with O(1) extra memory.
Examples