Accounts Merge

#721
Medium
Advanced Graphs
O(N log N)
O(N)
Facebook
Amazon
Google
View on LeetCode

Problem Description

Given a list of accounts where each element accounts[i] contains the account name and a list of emails, merge accounts that belong to the same person.