Write a function that takes a string as input and returns the string reversed.
class Solution {
public String reverseString(String s) {
int start = 0, end = s.length() - 1;
char[] letters = s.toCharArray();
while (start < end) {
char temp = letters[start];
letters[start] = letters[end];
letters[end] = temp;
++start;
--end;
}
return new String(letters);
}
}