C++, clean solution, beats 98%
Code\n\nclass Solution {\nprivate:\n    void filterEmail(string& s, const string& email) {\n        bool localName = true;\n        for (int i = 0; i < email.si
# Code\n```\nclass Solution {\nprivate:\n    void filterEmail(string& s, const string& email) {\n        bool localName = true;\n        for (int i = 0; i < email.size(); i++) {\n            if (email[i] == \'+\' && localName) {\n                while (email[i] != \'@\')\n                    i++;\n                localName = false;\n            } else if (email[i] == \'.\' && localName) {\n                continue; \n            } else if (email[i] == \'@\') {\n                localName = false;\n            } \n\n            s += email[i];\n        }\n    }\n\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n        unordered_set<string> S;  \n        for (auto& email : emails) {\n            string s = "";\n            filterEmail(s, email);\n            if (S.find(s) == S.end())\n                S.insert(s);\n        }\n        return S.size();\n    }\n};\n```
['Array', 'Hash Table', 'String', 'C++']