Reverse words in place (O(1) space)