Solution Find Longest Awesome Substring
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```\nclass Solution {\n    public function longestAwesome($s) {\n        $mp = [];\n        $mp[0] = -1;\n        $mask = 0;\n        $ans = 1;\n        \n        for ($i = 0; $i < strlen($s); $i++) {\n            $mask = $mask ^ (1 << (ord($s[$i]) - ord(\'0\')));\n            \n            if (isset($mp[$mask])) {\n                $ans = max($ans, $i - $mp[$mask]);\n            } else {\n                $mp[$mask] = $i;\n            }\n            \n            for ($k = 0; $k <= 9; $k++) {\n                $num = $mask ^ (1 << $k);\n                if (isset($mp[$num])) {\n                    $ans = max($i - $mp[$num], $ans);\n                }\n            }\n        }\n        \n        return $ans;\n    }\n}\n\n```
['PHP']