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; } }
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; } }

被折叠的 条评论
为什么被折叠?