Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 588ed48

Browse files
committed
Create README - LeetHub
1 parent b521398 commit 588ed48

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<h2><a href="https://leetcode.com/problems/find-users-with-valid-e-mails/?envType=study-plan-v2&envId=top-sql-50">1664. Find Users With Valid E-Mails</a></h2><h3>Easy</h3><hr><p>Table: <code>Users</code></p>
2+
3+
<pre>
4+
+---------------+---------+
5+
| Column Name | Type |
6+
+---------------+---------+
7+
| user_id | int |
8+
| name | varchar |
9+
| mail | varchar |
10+
+---------------+---------+
11+
user_id is the primary key (column with unique values) for this table.
12+
This table contains information of the users signed up in a website. Some e-mails are invalid.
13+
</pre>
14+
15+
<p>&nbsp;</p>
16+
17+
<p>Write a solution to find the users who have <strong>valid emails</strong>.</p>
18+
19+
<p>A valid e-mail has a prefix name and a domain where:</p>
20+
21+
<ul>
22+
<li><strong>The prefix name</strong> is a string that may contain letters (upper or lower case), digits, underscore <code>&#39;_&#39;</code>, period <code>&#39;.&#39;</code>, and/or dash <code>&#39;-&#39;</code>. The prefix name <strong>must</strong> start with a letter.</li>
23+
<li><strong>The domain</strong> is <code>&#39;@leetcode.com&#39;</code>.</li>
24+
</ul>
25+
26+
<p>Return the result table in <strong>any order</strong>.</p>
27+
28+
<p>The result format is in the following example.</p>
29+
30+
<p>&nbsp;</p>
31+
<p><strong class="example">Example 1:</strong></p>
32+
33+
<pre>
34+
<strong>Input:</strong>
35+
Users table:
36+
+---------+-----------+-------------------------+
37+
| user_id | name | mail |
38+
+---------+-----------+-------------------------+
39+
| 1 | Winston | [email protected] |
40+
| 2 | Jonathan | jonathanisgreat |
41+
| 3 | Annabelle | [email protected] |
42+
| 4 | Sally | [email protected] |
43+
| 5 | Marwan | quarz#[email protected] |
44+
| 6 | David | [email protected] |
45+
| 7 | Shapiro | [email protected] |
46+
+---------+-----------+-------------------------+
47+
<strong>Output:</strong>
48+
+---------+-----------+-------------------------+
49+
| user_id | name | mail |
50+
+---------+-----------+-------------------------+
51+
| 1 | Winston | [email protected] |
52+
| 3 | Annabelle | [email protected] |
53+
| 4 | Sally | [email protected] |
54+
+---------+-----------+-------------------------+
55+
<strong>Explanation:</strong>
56+
The mail of user 2 does not have a domain.
57+
The mail of user 5 has the # sign which is not allowed.
58+
The mail of user 6 does not have the leetcode domain.
59+
The mail of user 7 starts with a period.
60+
</pre>

0 commit comments

Comments
 (0)