✅  C++ || Easy Frequency Map Solution  ✅
\n\n# Code\n\n\n\nclass Solution {\npublic:\n    string getReversed(string s) {\n        string t = s;\n        reverse(t.begin(), t.end());\n        return t;\
\n\n# Code\n```\n\n\nclass Solution {\npublic:\n    string getReversed(string s) {\n        string t = s;\n        reverse(t.begin(), t.end());\n        return t;\n    }\n    int longestPalindrome(vector<string>& words) {\n        int resCount = 0, mCount = 0;\n        unordered_map<string, int> fm;\n        for (auto const &word : words) fm[word]++;\n        for (auto const &fv : fm) {\n            string rev = getReversed(fv.first);\n            if (fv.first != rev) {\n                auto it = fm.find(rev);\n                if (it != fm.end()) {\n                    resCount += min(fv.second, it->second);\n                }\n            } else {\n                resCount += fv.second;\n                if (fv.second & 1) {\n                    mCount = 1;\n                    resCount -= 1;\n                }\n            }\n        }\n        ;\n        return 2 *(resCount + mCount);\n    }\n};\n```
['C++']