Skip to content

Instantly share code, notes, and snippets.

@fida10
Created September 10, 2022 17:40
Show Gist options
  • Save fida10/493750f64bf3f0147d4ec474075ed351 to your computer and use it in GitHub Desktop.
Save fida10/493750f64bf3f0147d4ec474075ed351 to your computer and use it in GitHub Desktop.
class Solution:
def numUniqueEmails(self, emails: List[str]) -> int:
uniqueEmails = set();
ans = 0;
for indivString in emails:
uniqueEmails.add(
indivString.split("@")[0].split("+")[0].replace(".", "") + "@" + indivString.split("@")[1]);
return len(uniqueEmails);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment