Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Accounts Merge

Each account lists a name and emails. Two accounts belong to the same person if they share an email. Merge such accounts and print each merged account as: name followed by its sorted unique emails. Accounts are printed in order of their smallest email.

Constraints

1 <= n <= 1000 1 <= k <= 10

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.