python simple set solution
\nclass Solution(object):\n    def longestPalindrome(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        hash = set()\n     
```\nclass Solution(object):\n    def longestPalindrome(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        hash = set()\n        for c in s:\n            if c not in hash:\n                hash.add(c)\n            else:\n                hash.remove(c)\n        # len(hash) is the number of the odd letters\n        return len(s) - len(hash) + 1 if len(hash) > 0 else len(s)\n```
[]