Solution
C++ []\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n        unordered_set<string> uniqEmails;\n        for(string& email: emai
```C++ []\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n        unordered_set<string> uniqEmails;\n        for(string& email: emails) {\n            bool inDomain = false;\n            string actEmail;\n            int i = 0;\n            for(int i = 0; i < email.size(); ) {\n                char c = email[i];\n                if (inDomain) {\n                    actEmail.push_back(c);\n                    i++;\n                } else {\n                    if (c == \'@\') {\n                        actEmail.push_back(c);\n                        inDomain = true;\n                        i++;\n                    } else if (c == \'.\') {\n                        i++;\n                    } else if (c == \'+\') {\n                        while(email[i] != \'@\') {\n                            i++;\n                        }\n                    } else {\n                        actEmail.push_back(c);\n                        i++;\n                    }\n                }\n            }\n            uniqEmails.insert(actEmail);\n        }\n        return uniqEmails.size();\n    }\n};\n```\n\n```Python3 []\nclass Solution:\n    def numUniqueEmails(self, emails: List[str]) -> int:\n        addresses = set()\n\n        for email in emails:\n            local, domain = email.split(\'@\')\n            if \'+\' in local:\n                local = local[:local.index(\'+\')]\n            local = local.replace(\'.\', \'\')\n            addresses.add(local + \'@\' + domain)\n        \n        return len(addresses)\n```\n\n```Java []\nclass Solution {\n    public int numUniqueEmails(String[] emails) {\n        Set<String> es = new HashSet<>();\n        \n        for (String e: emails) {\n            es.add(strip(e));\n        }\n        return es.size();\n    }\n    public String strip(String e) {\n        int i = 0;\n        StringBuilder res = new StringBuilder();\n        \n        while (i < e.length()) {\n            char c = e.charAt(i);\n            if (c == \'+\') {\n                i = e.indexOf(\'@\');\n                continue;\n            } else if (c == \'@\') {\n                res.append(e.substring(i));\n                return res.toString();\n            } else if (c != \'.\')\n                res.append(c);\n            i++;\n        }\n        return res.toString();\n    }\n}\n```\n
['C++', 'Java', 'Python3']