Write a function that reverses a string by modifying the input array of characters in-place using O(1) extra memory.
Click Run to execute sample tests.