https://leetcode.com/problems/reverse-string/
Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
public class Solution {
public String reverseString(String s) {
int len = s.length();
char[] c = new char[len];
for(int i = 0; i<s.length(); i++){
c[len-i-1] = s.charAt(i);
}
return new String(c);
}
}