We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c10705 commit 08a430aCopy full SHA for 08a430a
code/929.unique-email-addresses.ts
@@ -0,0 +1,13 @@
1
+// @leet start
2
+function numUniqueEmails(emails: string[]): number {
3
+ const s = new Set<string>();
4
+ for (const e of emails) {
5
+ const [f, a] = e.trim().split("@");
6
+ const mf = f.split("+")[0].replace(/\./g, "");
7
+ const b = `${mf.trim()}@${a.trim()}`;
8
+ s.add(b);
9
+ }
10
+ return s.size;
11
+}
12
+// @leet end
13
+
0 commit comments