C++ 3 lines bit manipulations beats all
The theory is very simple: we XOR each letter to its position, at the end, each 1 left stands for "there exists odd number of that letter".\ntotal number of let
The theory is very simple: we XOR each letter to its position, at the end, each `1` left stands for "there exists odd number of that letter".\n`total number of letters` - `single letter(s) cannot be paired` + `if there is any single letter we can put ONE in the centre of the palindrome`\n\n```cpp\nint longestPalindrome(string s) {\n    bitset<64> bits(0);\n    for (char c : s) bits.flip(c - \'A\');\n    return s.size() - bits.count() + bits.any();\n}\n```
['Bit Manipulation', 'C']