100% beats very easy solution
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```\n/**\n * @param {string} s\n * @return {number}\n */\nvar longestAwesome = function(s) {\n    const m = new Map();\n    m.set(0, -1);\n    let maxLen =0;\n    let mask = 0;\n\n    for(let i =0; i < s.length; i++){\n        const digit = parseInt(s[i])\n        mask ^=(1 << digit);\n\n        if(m.has(mask)){\n            maxLen = Math.max(maxLen, i - m.get(mask))\n        }\n        for(let j =0; j < 10; j++){\n            const temp = mask ^(1 << j)\n            if(m.has(temp)){\n                maxLen = Math.max(maxLen, i - m.get(temp))\n            }\n        }\n        if(!m.has(mask)){\n            m.set(mask, i)\n        }\n    }\n    return maxLen\n};\n```
['JavaScript']