判断回文 c++
class Solution {
public:
bool isPalindrome(string s) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
string ss;
ss.assign(s.rbegin(),s.rend());
if(s==ss)
return true;
else
return false;
}
};

浙公网安备 33010602011771号