Java simple, modular solution (beats 100%)
Explanation:\nThe main part of the code is straightforward: process each email as instructed and add it to the hashset which allows to know how many unique emai
**Explanation:**\nThe main part of the code is straightforward: process each email as instructed and add it to the hashset which allows to know how many unique emails there are.\n\nThe process function examines an email character by character. The last "if" condition decides when to add a character. It will only add characters coming from the end of the email, and before the end of the email will ignore all points and all character after any plus symbol.\n\n**Analysis:**\nThis solution is in O(n) time and space. (n being the size of the input array)\nRuntime: faster than 100%. Memory: less than 98%.\n```\nclass Solution {\n    public int numUniqueEmails(String[] emails) {\n        Set<String> uniqueEmails = new HashSet<>();\n        for(String email: emails){\n            uniqueEmails.add(processEmail(email));\n        }\n        return uniqueEmails.size();\n    }\n    \n    \n    private String processEmail(String email){\n        StringBuilder outEmail = new StringBuilder();\n        \n        boolean afterPlus = false, endEmail = false;\n        for(char c: email.toCharArray()){\n            if(c == \'+\') afterPlus = true;\n            if(c == \'@\') endEmail = true;\n            if(endEmail || (!afterPlus && c != \'.\')) outEmail.append(c);\n        }\n        \n        return outEmail.toString();\n    }\n}\n```
[]