Robinhood round 1 interview question

Posted
3 Aug 2025
392 reads

Summary

This post details a coding interview question encountered during a Robinhood round 1 interview, which involved designing a leaderboard for their referral program to track top referrers.

How it went

Robinhood is famous for its referral program. It’s exciting to see our users spreading the word across their friends and family. One thing that is interesting about the program is the network effect it creates. We would like to build a dashboard to track the status of the program. Specifically, we would like to learn about how people refer others through the chain of referral.

For the purpose of this question, we consider that a person refers all other people down the referral chain. For example, A refers B, C, and D in a referral chain of A -> B -> C -> D. Please build a leaderboard for the top 3 users who have the most referred users along with the referral count.

Referral rules:

A user can only be referred once. Once the user is on the RH platform, he/she cannot be referred by other users. For example: if A refers B, no other user can refer A or B since both of them are on the RH platform. Referrals in the input will appear in the order they were made. Leaderboard rules:

The user must have at least 1 referral count to be on the leaderboard. The leaderboard contains at most 3 users. The list should be sorted by the referral count in descending order. If there are users with the same referral count, break the ties by the alphabetical order of the user name. Input

rh_users –> array.string new_users –> array.string rh_users = ["A", "B", "C"] | | | v v v new_users = ["B", "C", "D"] Output

array.string ["A 3", "B 2", "C 1"] ** note: at the beginning of the interview, the output may be returning [“a”,”b”] as starter code.

Additional Details

[execution time limit] 4 seconds [memory limit] 1GB [input] array.string rh_users A list of referring users [input] array.string new_users A list of users that was referred by the users in the referrers array in the same order [output] array.string An array of 3 users on the leaderboard. Each of the elements here would have the “[user] [referral count]” format. For example, “A 4”

Questions asked (1)

  1. 01

    Build Robinhood Referral Program Leaderboard

    Data Structures & Algorithms · Medium

    Robinhood is famous for its referral program. It’s exciting to see our users spreading the word across their friends and family. One thing that is interesting about the program is the network effect it creates. We would like to build a dashboard to track the status of the program. Specifically, we would like to learn about how people refer others through the chain of referral.

    For the purpose of this question, we consider that a person refers all other people down the referral chain. For example, A refers B, C, and D in a referral chain of A -> B -> C -> D. Please build a leaderboard for the top 3 users who have the most referred users along with the referral count.

    Referral rules:

    A user can only be referred once. Once the user is on the RH platform, he/she cannot be referred by other users. For example: if A refers B, no other user can refer A or B since both of them are on the RH platform. Referrals in the input will appear in the order they were made. Leaderboard rules:

    The user must have at least 1 referral count to be on the leaderboard. The leaderboard contains at most 3 users. The list should be sorted by the referral count in descending order. If there are users with the same referral count, break the ties by the alphabetical order of the user name. Input

    rh_users –> array.string new_users –> array.string rh_users = ["A", "B", "C"] | | | v v v new_users = ["B", "C", "D"] Output

    array.string ["A 3", "B 2", "C 1"] ** note: at the beginning of the interview, the output may be returning [“a”,”b”] as starter code.

    Additional Details

    [execution time limit] 4 seconds [memory limit] 1GB [input] array.string rh_users A list of referring users [input] array.string new_users A list of users that was referred by the users in the referrers array in the same order [output] array.string An array of 3 users on the leaderboard. Each of the elements here would have the “[user] [referral count]” format. For example, “A 4”

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Robinhood recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!