#include<string>
class Solution {
public:
string solve(string str) {
// write code here
reverse(str.begin(),str.end());
return str;
}
};
reverse方法反转字符串
最新推荐文章于 2023-11-11 13:03:53 发布
#include<string>
class Solution {
public:
string solve(string str) {
// write code here
reverse(str.begin(),str.end());
return str;
}
};