NeetCode #584LC-721MediumGraphsNC 250
← Back to All Problems#584 · #721 · Accounts Merge(账户合并)
📌 Problem Statement & Constraints
Given a list of
accounts where accounts[i] = [name, email1, email2, ...], merge accounts that share any email. Two accounts belong to the same person if they share a common email. Return the merged accounts with emails sorted, in any order. Constraints: 1 <= accounts.length <= 1000, 1 <= emails per account <= 10.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!