Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
class Solution {
public:
string reverseString(string s) {
int n= s.size();
if(n<=1)
return s;
string res = "";
for(int i = 0;i<n;i++)
{
res=s[i]+res;
}
return res;
}
};