Reverse a string

O(N) solution. Parse half the string and swap elements accordingly.