Implement a Referral Network (Graph Design)
Asked at Mercor · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Implement a system that maintains a directed graph of "referrer → candidate" relationships. Each user is a node; if user `u` referred user `v`, there is a directed edge `u -> v`.
Loading the problem…
More Mercor interview questions
- Auditing a Math Fine-Tuning Dataset and Testing Whether It Helps
- Build an LLM Evaluation Harness with Ollama Integration
- Rank Top-K Users by Network Reach and Flow Centrality
- Check-and-Insert for a Growing Set of User IDs
- Debug a Quadratic CSV Writer: Trailing Commas and Quoting
- Permutation Sort and the Rank of the First Sorted Ordering