int longestPalindrome(char * s){ int hash[58] = {0}; int i,oodMax=0,len=strlen(s),sum=0; for (i=0; i<len; i++) { hash[s[i]-'A']++; } for (i=0; i<58; i++) { sum += hash[i] - hash[i] % 2; } return sum+(sum != len); }