Find the duplicate accounts of a given Airbnb account.
Unlock detailed company stats for this questionUpgrade
Each person should have only one account, but people end up with multiple accounts sharing the same email, phone number, government ID, device or other identity information. Given a list of accounts (each named "A", "B", etc.) with identity attributes, build a function that returns the duplicate accounts for any given account. Account names are unique.
Example: accounts A, B, C, D, where A and D share phone 12345 and others are linked by shared identifiers, give duplicates of A = [C, D]; adding account E into the chain gives [C, D, E].
Expect follow-ups like
- What if we add another identifier like GovtId?
Format · Airbnb coding round, 45 minutes plus dry run.
Community answers
No answers contributed by the community yet.
Related questions
Given a dataset of numbers, find the duplicates and their counts.Given an array of integers, find the first duplicate.Find the DuplicatesRelated courses

Course

Course
Course
