Python (Simple Hashmap)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def longestAwesome(self, s):\n        n, dict1, mask, max_len = len(s), {0:-1}, 0, 0 \n\n        for i in range(n):\n            mask = mask^(1<<int(s[i]))\n\n            if mask not in dict1:\n                dict1[mask] = i \n            else:\n                max_len = max(max_len,i-dict1[mask])\n\n            for j in range(10):\n                mask1 = mask^(1<<j)\n                if mask1 in dict1:\n                    max_len = max(max_len,i-dict1[mask1])\n\n        return max_len\n```
['Python3']