Practice Delete Duplicate Emails
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Tables: Person(id INT, email VARCHAR). Person.id is unique; email values contain no uppercase letters. Delete repeated email rows, retaining the smallest id for each email. SQL must modify Person with DELETE; a SELECT result is insufficient. Pandas must modify Person in place. The evaluated output is the remaining Person table, in any order.
Source: Delete Duplicate Emails on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Person table: +----+------------------+ | id | email | +----+------------------+ | 1 | john@example.com | | 2 | bob@example.com | | 3 | john@example.com | +----+------------------+
+----+------------------+ | id | email | +----+------------------+ | 1 | john@example.com | | 2 | bob@example.com | +----+------------------+
Related LeetCode Problems
Practice more problems similar to Delete Duplicate Emails.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.