CPP solution|| map || O(n)
There is two case \n\t1. when both character in each string is same \n\t2. when both are different\n\t\nso store the count of each string in unordered map then 
There is two case \n\t1. when both character in each string is same \n\t2. when both are different\n\t\nso store the count of each string in unordered map then then iterrate the map and check wheater it belong to case 1 or case 2 if it is belong to\n\tcase 1 then check that if unordered map has inverse of it or no if yes then tak min of then and desc the count\n\tcase 2 then simple count all of them \n\t```\n\tint longestPalindrome(vector<string>& words) {\n        unordered_map<string,int> umap;\n        \n        for(auto iter:words){\n            umap[iter]++;\n        }\n        int odd=0;\n        int ans=0;\n        for(auto iter:words){\n            if(umap[iter]==0) continue;\n            string k=iter;\n            int mn=0;\n            reverse(iter.begin(),iter.end());\n            int c=umap[k];\n            umap.erase(k);\n            if(umap.count(iter)){\n                mn=min(c,umap[iter]);\n                c-=mn;\n                umap[iter]-=mn;\n                \n            }\n            ans+=mn*4;\n            if(c>0&&iter[0]==iter[1]){\n                ans+=((c%2==0)?c:c-1)*2;\n                c-=(c%2==0)?c:c-1;\n                if(c>0&&!odd)\n                    odd+=2;\n            \n            }\n            \n        }\n        return ans+odd;\n\t\t```\n\t\tThanks!
[]