IndiaMART Interview Question

1. Reverse a string with O(1) space.