C++ easy solution using map
```\nclass Solution {\npublic:\n    int longestPalindrome(vector& words) {\n        unordered_map map;\n        int count = 0;\n        for(auto s:words)\n     
```\nclass Solution {\npublic:\n    int longestPalindrome(vector<string>& words) {\n        unordered_map<string,int> map;\n        int count = 0;\n        for(auto s:words)\n        {\n            string t = s;\n            reverse(t.begin(),t.end());\n            if(map[t]>0)\n            {\n                count += 4;\n                map[t]--;\n            }\n            else\n                map[s]++;\n        }\n        bool flag = false;\n        for(auto it:map)\n        {\n            if(it.second==1 && it.first[0]==it.first[1])\n            {\n                flag = true;\n                break;\n            }\n        }\n        return flag == true ? count+2:count;\n    }\n};
['C']