牛客题霸--反转字符串题解
反转字符串
http://www.nowcoder.com/questionTerminal/c3a6afee325e472386a1c4eb1ef987f3
暴力, 原始字符串取反存入新字符串
class Solution { public: string solve(string str) { string reverse_str; for ( int i = str.size()-1; i >= 0; i--) reverse_str.push_back(str[i]); return reverse_str; } };