标签:false lin str ali isp turn col class int
class Solution { public: bool isPalindrome(string s) { int i = 0, j = s.length() - 1; while (i < j) { if (!isalnum(s[i])) i++; else if (!isalnum(s[j])) j--; else { if (tolower(s[i]) != tolower(s[j])) return false; i++; j--; } } return true; } };
标签:false lin str ali isp turn col class int
原文地址:https://www.cnblogs.com/JTechRoad/p/9063313.html