Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd3c9fba

Browse files
refactor 929
1 parent913925c commitd3c9fba

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,6 @@
55
importjava.util.Map;
66
importjava.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
publicclass_929 {
379
publicstaticclassSolution1 {
3810
publicintnumUniqueEmails(String[]emails) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp