vector<int> sv(59, 0);
for(int i = 0 ; i < (int)s.size(); i++){
sv[(int)(s[i] - 'A')]++;
}
class Solution {
public:
int longestPalindrome(string s) {
vector<int> sv(59, 0);
for(int i = 0 ; i < (int)s.size(); i++){
sv[(int)(s[i] - 'A')]++;
}
int pairCount = 0;
int singleCount = 0;
for(int i = 0 ; i < 59; i++){
while(sv[i] != 0 && sv[i] != 1 ){
sv[i] = sv[i] - 2;
pairCount += 2;
}
if(sv[i] == 1){
singleCount++;
}
}
return singleCount > 0 ? pairCount + 1 : pairCount;
}
};