Skip to content

Commit d3c9fba

Browse files
refactor 929
1 parent 913925c commit d3c9fba

File tree

1 file changed

+0
-28
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-28
lines changed

src/main/java/com/fishercoder/solutions/_929.java

-28
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,6 @@
55
import java.util.Map;
66
import java.util.Set;
77

8-
/**
9-
* 929. Unique Email Addresses
10-
*
11-
* Every email consists of a local name and a domain name, separated by the @ sign.
12-
* For example, in alice@leetcode.com, alice is the local name, and leetcode.com is the domain name.
13-
* Besides lowercase letters, these emails may contain '.'s or '+'s.
14-
* If you add periods ('.') between some characters in the local name part of an email address, mail sent there will be forwarded to the same address without dots in the local name.
15-
* For example, "alice.z@leetcode.com" and "alicez@leetcode.com" forward to the same email address. (Note that this rule does not apply for domain names.)
16-
* If you add a plus ('+') in the local name, everything after the first plus sign will be ignored.
17-
* This allows certain emails to be filtered, for example m.y+name@email.com will be forwarded to my@email.com. (Again, this rule does not apply for domain names.)
18-
* It is possible to use both of these rules at the same time.
19-
* Given a list of emails, we send one email to each address in the list. How many different addresses actually receive mails?
20-
*
21-
* Example 1:
22-
*
23-
* Input: ["test.email+alex@leetcode.com","test.e.mail+bob.cathy@leetcode.com","testemail+david@lee.tcode.com"]
24-
* Output: 2
25-
*
26-
* Explanation: "testemail@leetcode.com" and "testemail@lee.tcode.com" actually receive mails
27-
*
28-
* Note:
29-
*
30-
* 1 <= emails[i].length <= 100
31-
* 1 <= emails.length <= 100
32-
* Each emails[i] contains exactly one '@' character.
33-
* All local and domain names are non-empty.
34-
* Local names do not start with a '+' character.
35-
* */
368
public class _929 {
379
public static class Solution1 {
3810
public int numUniqueEmails(String[] emails) {

0 commit comments

Comments
 (0)