Where I went wrong using a dictionary and python3 when I found 93139 from 9498331
I thought I had a clever solution to this as I don\'t really know how to use bitmasks, so I basically used a dictionary instead to store the occurences of each 
I thought I had a clever solution to this as I don\'t really know how to use bitmasks, so I basically used a dictionary instead to store the occurences of each character, and then since there can be unlimited swaps, I created a new string based on each value that is greater than 2 in my dictionary. \n\nFor the awesome string, I built it using the half + single + half reflected and then counted the length. \n\nWhy should this testcase be 3 as the longest instead of 5? \n\nWrong Answer\nDetails\nInput\n"9498331"\nstdout\n93439\n\nOutput\n5\nExpected\n3\n\n```\nclass Solution:\n    def longestAwesome(self, s: str) -> int:\n        number_of_ch = {}\n        \n        #Read the string character by character into a dict\n        #Key is the ch, value is the # of char found in the string. \n        for ch in s:\n            if number_of_ch.get(ch) is not None:\n                number_of_ch.update({ch:number_of_ch[ch] + 1})\n            else: \n                number_of_ch[ch] = 1\n                    \n        #Create palindrome from the values in the dict. \n        #When the value in the dict is >= 2 then we can add that value to beginning and end of the awesome string, and then reduce the value of the char by 2.\n        single_used = False\n        single_ch = \'\'\n        awesome_half = \'\'\n\n        for ch in number_of_ch.keys():\n            if number_of_ch.get(ch) >= 2:\n                multi = (int(number_of_ch.get(ch) / 2))\n                awesome_half = awesome_half + multi * str(ch)\n                number_of_ch.update({ch:number_of_ch[ch] % 2})\n            elif single_used == False and number_of_ch.get(ch) == 1:\n                single_ch = ch\n                number_of_ch.update({ch:number_of_ch[ch] - 1})\n                single_used = True\n        awesome = awesome_half + single_ch + awesome_half[::-1]\n        \n        print(awesome)\n        return len(awesome)\n\t```
[]