C++ || Hashing Used || Commented and Readable
\n# Code\n\nclass Solution {\npublic:\n    int longestPalindrome(vector<string>& words) {\n        map<string,int>freq;\n        map<string,bool>vis;\n        i
\n# Code\n```\nclass Solution {\npublic:\n    int longestPalindrome(vector<string>& words) {\n        map<string,int>freq;\n        map<string,bool>vis;\n        int equalWord = 0;\n        int largestPalindromeLength = 0;\n        int flg = 0 , mx=0;\n        for(auto it : words){\n            freq[it]++;\n        }\n       \n\n        for(int i=0;i<words.size();i++){\n        //see for curr_word and reverse_word in freq if exist , if both curr_word and reverse_word are equal take them only 1 time\n        string curr_word = words[i];\n        string reverse_word = curr_word ;\n         reverse(reverse_word.begin(),reverse_word.end());\n\n         // equal case take if even freq or if odd take only 1 time\n         if(curr_word == reverse_word and vis[curr_word]==0 ){\n            \n             if( !(freq[curr_word]&1) ){\n              largestPalindromeLength+= 2*freq[curr_word] ;\n              vis[curr_word]=1 ;\n             }\n              \n              //execute by decrementing 1 count\n              else if ( (freq[curr_word]&1) ){\n                  flg+=1;\n                  largestPalindromeLength+= 2*(freq[curr_word]-1)  ;\n                  vis[curr_word]=1 ;\n              }\n         }\n\n//lclc llll clcl\n        if(vis[curr_word]==0 and vis[reverse_word]==0){\n        //find reverse in freq\n        if(freq[reverse_word] > 0 and curr_word != reverse_word ){\n            //take min occurence of curr_word and reverse_word\n            largestPalindromeLength+= 4*min(freq[curr_word] , freq[reverse_word]);\n            vis[curr_word]=1 ; \n            vis[reverse_word]=1;\n        }\n        }\n\n        }\n//if odd length was true take 1 more count\n if(flg) {\n     largestPalindromeLength+= 2;\n }\n\n        return largestPalindromeLength;\n    }\n};\n```\n\n```\nIf you find this solutions to be helpful do upvote..It keeps me motivated :)\n```
['Hash Table', 'String', 'C++']