python3, using Counter and set (1160 ms, faster than 99.12%)
https://leetcode.com/submissions/detail/878981563/  \nRuntime: 1160 ms, faster than 99.12% of Python3 online submissions for Longest Palindrome by Concatenating
https://leetcode.com/submissions/detail/878981563/  \nRuntime: **1160 ms**, faster than 99.12% of Python3 online submissions for Longest Palindrome by Concatenating Two Letter Words.  \nMemory Usage: 38.5 MB, less than 24.23% of Python3 online submissions for Longest Palindrome by Concatenating Two Letter Words.  \n```\nclass Solution:\n    def longestPalindrome(self, words: List[str]) -> int:\n        length, has_used_extra_anagram = 0, False\n        c, s = Counter(words), set(c.keys())\n        while s:\n            w1 = s.pop()\n            w2 = w1[::-1]\n            if w1==w2: ## anagram\n                length += 4 * (c[w1]//2) ## pair with itself\n                if not has_used_extra_anagram and c[w1]%2:\n                    has_used_extra_anagram = True\n                    length += 2\n            elif w2 in s: ## has palindrome\n                length += 4 * min(c[w1], c[w2])\n                s.remove(w2)\n        return length\n```\n\n**A large test case**  \nhttps://leetcode.com/submissions/detail/878928694/testcase/  \n
['Ordered Set', 'Python', 'Python3']