You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(count>1) // if there is odd times appear char we can only fit one in the middle , rest of are even which can make palindrome , so total length-odd+1
return s.length()-count+1;
else
return s.length(); //there is no odd number of times character then it is even number's string which is definitely palindrome