Cluster Alt Accounts That Share Device Fingerprints
Last updated: November 29, 2026
Quick Overview
Given login records of (account_id, device_id), group accounts that are connected through shared devices, directly or transitively, while ignoring devices used by more than a threshold number of accounts (such as school computer labs).
Roblox
November 29, 20260
0
0 solved
Given login records of (account_id, device_id), group accounts that are connected through shared devices, directly or transitively, while ignoring devices used by more than a threshold number of accounts (such as school computer labs).
Trust and safety at Roblox needs to link alternate accounts used to evade bans, but shared family tablets and school labs create false links. The interviewer checks union find with path compression, transitive merging, and judgment about noisy high-degree nodes.
What the Interviewer Expects
- Recognize transitive grouping as connected components
- Implement union find with path compression and union by size
- Union all accounts on a device against one representative
- Skip high-fanout devices to avoid giant false clusters
- Return deterministic, sorted output
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you support un-linking when a device turns out to be a shared kiosk after the fact?
- How would you weight evidence (IP, payment instrument, device) instead of a hard yes or no?
- How would you run this daily over billions of logins in a batch system?
- What precision and recall trade-offs come with lowering the device threshold?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Two accounts belong together if they share any device or are linked through a chain of shared devices. Devices seen on more than max_accounts_per_device accounts are treated as public and contribute...
High-Level Design
First bucket accounts by device. Then, for each device under the threshold, union every account in its bucket with the first one, which costs unions for accounts instead of pairs. Unio...