[C++] Brute Force Solution | Beats 100% Runtime | 95% less space
\nclass Solution\n{\npublic:\n    int numUniqueEmails(vector<string> &emails)\n    {\n        set<string> res;\n        for (int i = 0; i < emails.size(); ++i)\
```\nclass Solution\n{\npublic:\n    int numUniqueEmails(vector<string> &emails)\n    {\n        set<string> res;\n        for (int i = 0; i < emails.size(); ++i)\n        {\n            int count = 0;\n            for (int j = 0; j < emails[i].length(); ++j)\n            {\n                if (emails[i][j] == \'@\')\n                    break;\n                else if (emails[i][j] == \'.\')\n                {\n                    emails[i].erase(j, 1);\n                    --j;\n                }\n                else if (emails[i][j] == \'+\')\n                {\n                    count = j;\n                    break;\n                }\n            }\n\n            int pos = emails[i].find(\'@\');\n            if (count != 0)\n                emails[i].erase(count, pos - count);\n            res.insert(emails[i]);\n        }\n        return res.size();\n    }\n};\n```
[]