The idea is to keep toggle the corresponding bit representing the character.

Leverage C++ bitset to speed up the counting of bits get set.

```
class Solution {
public:
int longestPalindrome(string s) {
bitset<128> odds;
for (char c: s) {
odds[c].flip();
}
// total = length of s - any non even part (odds) except one
return s.size() - odds.count() + odds.any();
}
};
```