[Python3] Solution with using hashmap
\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        c = collections.Counter(words)\n        \n        res = 0\n        mid = 0
```\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        c = collections.Counter(words)\n        \n        res = 0\n        mid = 0\n        \n        for key in c:\n            mirror = key[::-1]\n            \n            if key == mirror:\n                res += 2 * (c[key] // 2)\n                mid |= c[key] % 2\n            else:\n                if c[mirror] != 0:\n                    res += min(c[key], c[mirror])\n\n        return res * 2 + (2 if mid else 0)\n```
['Greedy', 'Python3']