C++ || EASY TO UNDERSTAND || simple solution
\nclass Solution {\npublic:\n    int longestPalindrome(vector<string>& words) {\n        unordered_map<string,int> avail;\n        int ans=0;\n        for(auto 
```\nclass Solution {\npublic:\n    int longestPalindrome(vector<string>& words) {\n        unordered_map<string,int> avail;\n        int ans=0;\n        for(auto &word:words)\n        {\n            string rev=word;\n            reverse(rev.begin(),rev.end());\n            if(avail[rev]>0)\n            {\n                ans+=4;\n                avail[rev]--;\n            }\n            else\n            avail[word]++;\n        }\n        for(auto &pr:avail)\n        {\n            string word=pr.first;\n            int cnt=pr.second;\n            if(word[0]==word[1]&&cnt>0)\n            {\n                ans+=2;\n                break;\n            }\n        }\n        return ans;\n    }\n};\n```\n**Please upvote to motivate me in my quest of documenting all leetcode solutions(to help the community). HAPPY CODING:)\nAny suggestions and improvements are always welcome**
[]