LeetCode MEDIUM 721 Accounts Merge Summary
Generated by Codex with GPT-5
Quick facts
- Difficulty:
MEDIUM - Problem: Accounts Merge
- Topics:
Array,Hash Table,String,Depth-First Search,Breadth-First Search,Union-Find,Sorting
Problem gist
Each account is a list where the first value is a person’s name and the remaining values are email addresses. Two accounts belong to the same real person if they share at least one email address. The task is to merge every connected set of accounts and return one account per person, with the person’s name followed by that person’s emails in sorted order.
Continue ...