class Solution { public: bool validPalindrome(string s) { int len = s.length(); ) return true; , len - , ); } private: bool judge(string s, int l, int r, int cnt) { ) { if (s[l] != s[r]) { ) return false; , r, cnt - ) || judge(s, l, r - , cnt - ); }…