Microsoft SDE Intern Interview Experience
πΌ LTIMindtree Interview Experience (On-Campus) | Fresher | 2026
Salesforce SMTS | Interview Experience | Rejected
JPMC | SDE2 (Associate) - Java Backend - Interview Experience + Compensation
Microsoft - SDE2 - Coding Round
Robinhood round 1 interview question
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.
Full Experience
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β
Interview Questions (1)
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β