[2 approaches][set][easy understanding]
\n//1.\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n        set<string> s;\n        for(auto email:emails){\n            int i
```\n//1.\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n        set<string> s;\n        for(auto email:emails){\n            int i=email.find(\'@\');\n            string temp=email.substr(0,i);\n            string last=email.substr(i);\n            if(temp.find(\'+\')){\n                temp=temp.substr(0,temp.find(\'+\'));\n            }\n            temp.erase(remove(temp.begin(), temp.end(), \'.\'), temp.end());\n            s.insert(temp+last);\n        }\n        return s.size();\n    }\n};\n//2.\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {\n    set<string> s;\n    for(string &email : emails) {\n        string cleanEmail;\n        for(char c : email) {\n            if(c == \'+\' || c == \'@\') break;\n            if(c == \'.\') continue;\n            cleanEmail += c;\n        }\n        cleanEmail += email.substr(email.find(\'@\'));\n        s.insert(cleanEmail);\n    }\n    return s.size();\n    }\n};\n```\n**Feel free to ask any question in the comment section.**\nI hope that you\'ve found the solution useful.\nIn that case, **please do upvote and encourage me** to on my quest to document all leetcode problems\uD83D\uDE03\nHappy Coding :)\n
['C', 'Ordered Set', 'C++']