Search
⌘K

Leetcode 721. Accounts Merge

Given lists of accounts where each account has a name and emails, merge accounts that share any email by grouping connected emails (e.g., via union-find or graph traversal) and return each person's name with their sorted unique emails. Note names alone don't imply same person — connectivity is determined solely by shared email addresses.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late October, 2025

Meta

Senior

Late July, 2025

Meta

Mid-level

Late May, 2025

Meta

Mid-level

Comments

Your account is free and you can post anonymously if you choose.