Python Solution || Hash Map Approach
\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n    \n        counter = Counter(words)\n       \n        res = mid = 0 \n\n       
```\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n    \n        counter = Counter(words)\n       \n        res = mid = 0 \n\n        for word in counter.keys():\n            \n            if word[0]==word[1]:\n                res += counter[word] if counter[word]%2==0 else counter[word]-1\n                mid |= counter[word]%2\n            \n            elif word[::-1] in counter:\n                res += min(counter[word],counter[word[::-1]])\n        \n        return (res + mid) * 2\n```
[]