Robinhood logo

Robinhood Hard Interview Questions

4 hard-level practice questions for Robinhood technical interviews

Robinhood software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
2
Coding
1
System Design
coding Hard Verified Question #1

1. Maximum Multiplier Path


Category: Graph coding problem
You are given a directed graph with n nodes labeled 0 through n - 1. Each directed edge connects node u to node v and carries an integer...
Input: Graph (nodes and edges)
Output: Integer
Want to practise this one?
Create a free account to open the full question and practise Robinhood questions with AI.
Sign up free
coding Hard Verified Question #2

2. Stock Trades Matching


Category: Graph coding problem
A brokerage reconciliation system compares two lists of trade confirmations: one from the in-house system (house) and one from the street-side...
Input: Graph (nodes and edges)
Output: Computed result
system design Hard Verified Question #3

3. Most Frequent Robinhood System Design Questions


Category: Priority queue system design problem

System Design Questions - Robinhood Robinhood has a fairly fixed System Design Bank and usually asks one of these 2 questions

Input: Given input
Output: Computed result
coding Hard tree #1

1. [AI Enabled Coding] Referral Credit Leaderboard


Robinhood's growth team needs an internal leaderboard that credits customers for their entire downstream referral network, not just their direct referrals. Build the initial referral processor, then extend it so operations teams can change whether an individual referral qualifies for credit without deleting that person's network; you may use an AI assistant while implementing and testing your solution.
Part 1 — Build the referral network
  • Process records in input order. Every record has string fields id, type, referrer, and referee; type is referral.

  • The platform starts empty. Accept a referral only when referrer != referee and the referee is not already on the platform. A rejected record has no effects, including not registering its referrer.

  • An accepted referral registers the referrer if necessary, registers the referee, and permanently makes the referee a direct child of the referrer. A registered user cannot subsequently acquire a parent.

  • Every registered user initially qualifies for referral credit. A user's score is the number of qualifying users in their entire descendant subtree, excluding themselves. Thus, a referral can increase several ancestors' scores.

  • Return the top three users with strictly positive scores, ordered by descending score and then ascending case-sensitive ASCII username. Return fewer than three when appropriate. Rejected referrals are silently ignored in Part 1.

  • Avoid walking every ancestor for every record: a long referral chain must not cause quadratic processing. The complete input is available in advance, so offline preprocessing is permitted.


Function signature: referral_leaderboard(records: list[dict[str, str]]) -> candidate_defined
The return type is up to you; the examples use a leaderboard object containing {user, score} entries.
Example 1:
Input:
[
  {"id":"r1","type":"referral","referrer":"Ava","referee":"Ben"},
  {"id":"r2","type":"referral","referrer":"Ben","referee":"Cara"},
  {"id":"r3","type":"referral","referrer":"Ava","referee":"Drew"},
  {"id":"r4","type":"referral","referrer":"Cara","referee":"Ava"},
  {"id":"r5","type":"referral","referrer":"Drew","referee":"Eli"}
]

Output:
{"leaderboard":[{"user":"Ava","score":4},{"user":"Ben","score":1},{"user":"Drew","score":1}]}

Explanation: Ava receives credit for Ben, Cara, Drew, and Eli. Ben receives credit for Cara, and Drew receives credit for Eli. r4 is rejected because Ava already exists; Ben wins the score-1 tie over Drew.
Part 2 — Qualification corrections and an auditable timeline
Operations now sends qualification records with string fields id, type, user, and state, where state is exactly included or excluded.
  • An excluded user contributes zero credit to every ancestor; an included user contributes one. This changes only that user's contribution: descendants remain attached and contribute according to their own states.

  • Qualification does not affect whether a user can receive referrals or appear on the leaderboard. In particular, excluding a user does not directly change that user's own score.

  • A qualification record for a user who has not yet registered is ignored, even if that user appears later. Setting the current state again is also ignored. A genuine state change is applied, even for a root with no ancestors.

  • Keep all Part 1 referral rules. Every newly registered user starts included, and qualification changes never allow a user to be referred again.

  • Return the final leaderboard plus a timeline entry after every input record. Each entry contains its id, a status of applied or ignored, and the leaderboard immediately after that record. Accepted referrals and genuine qualification changes are applied; all other records are ignored.

  • Discuss how your return type changes before implementing this extension. Use a flexible event-handler design so future event types can be added without rewriting the leaderboard data structure. Future handlers must still define their exact effects on registration or referral credit.


Extended function signature: referral_timeline(records: list[dict[str, str]]) -> candidate_defined
Example 2:
Input:
[
  {"id":"a","type":"referral","referrer":"Ava","referee":"Ben"},
  {"id":"b","type":"referral","referrer":"Ben","referee":"Cara"},
  {"id":"c","type":"referral","referrer":"Cara","referee":"Dana"},
  {"id":"d","type":"qualification","user":"Ben","state":"excluded"},
  {"id":"e","type":"qualification","user":"Cara","state":"excluded"}
]

Output:
{
  "leaderboard":[{"user":"Ava","score":1},{"user":"Ben","score":1},{"user":"Cara","score":1}],
  "timeline":[
    {"id":"a","status":"applied","leaderboard":[{"user":"Ava","score":1}]},
    {"id":"b","status":"applied","leaderboard":[{"user":"Ava","score":2},{"user":"Ben","score":1}]},
    {"id":"c","status":"applied","leaderboard":[{"user":"Ava","score":3},{"user":"Ben","score":2},{"user":"Cara","score":1}]},
    {"id":"d","status":"applied","leaderboard":[{"user":"Ava","score":2},{"user":"Ben","score":2},{"user":"Cara","score":1}]},
    {"id":"e","status":"applied","leaderboard":[{"user":"Ava","score":1},{"user":"Ben","score":1},{"user":"Cara","score":1}]}
  ]
}

Explanation: After c, the chain has scores 3, 2, and 1. Excluding Ben subtracts 1 only from Ava: her score becomes 0 + 1 + 1 = 2, while Ben still counts Cara and Dana. Excluding Cara subtracts 1 from Ava and Ben; Dana is then the sole qualifying descendant credited to each of Ava, Ben, and Cara. The final three-way tie is resolved alphabetically.
Example 3:
Input:
[
  {"id":"p","type":"referral","referrer":"Mia","referee":"Noah"},
  {"id":"q","type":"referral","referrer":"Noah","referee":"Owen"},
  {"id":"r","type":"qualification","user":"Noah","state":"excluded"},
  {"id":"s","type":"qualification","user":"Noah","state":"excluded"},
  {"id":"t","type":"referral","referrer":"Owen","referee":"Mia"}
]

Output:
{
  "leaderboard":[{"user":"Mia","score":1},{"user":"Noah","score":1}],
  "timeline":[
    {"id":"p","status":"applied","leaderboard":[{"user":"Mia","score":1}]},
    {"id":"q","status":"applied","leaderboard":[{"user":"Mia","score":2},{"user":"Noah","score":1}]},
    {"id":"r","status":"applied","leaderboard":[{"user":"Mia","score":1},{"user":"Noah","score":1}]},
    {"id":"s","status":"ignored","leaderboard":[{"user":"Mia","score":1},{"user":"Noah","score":1}]},
    {"id":"t","status":"ignored","leaderboard":[{"user":"Mia","score":1},{"user":"Noah","score":1}]}
  ]
}

Explanation: After r, Mia's score is 0 for Noah + 1 for Owen = 1; Noah still has score 1 for Owen. The repeated exclusion changes nothing. The last referral would close a cycle, but is already rejected by the existing-user rule because Mia registered at p; neither score changes.
Notes:
  • There are at most 100,000 records and at most twice as many distinct registered users. Aim for O(m log²(m + 2)) total time or better and O(m) space, including the timeline.

  • Record IDs are unique. Usernames contain 1–32 ASCII letters, fields are well-formed strings, and Part 2 contains only the two specified event types.

  • An empty input produces an empty leaderboard and, in Part 2, an empty timeline. This is a single-threaded, in-memory batch processor; no persistence or external calls are required.
Want to practise this one?
Create a free account to open the full question and practise Robinhood questions with AI.
Sign up free

Start practicing Robinhood questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free