static bool IsPalindrome(string s)
{
if (num >= s.Length - num - 1)
{
return true;
}
else if (s[num] == s[s.Length - num - 1])
{
num++; // 全局变量
IsPalindrome(s);
return true;
}
else
{
return false;
}
}
转载请注明原文地址: https://ibbs.8miu.com/read-2269316.html