Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
14
:
03
:
47
:
18
Employee Referral Program
A company runs a referral program where employees can refer new hires. When employee A refers employee B, A receives credit not only for B but also for everyone B subsequently refers, and so on transitively.
Given two parallel lists -- referrers and referrals -- where referrers[i] referred referrals[i], compute the total referral credit for each person who made at least one referral. Return the top 3 referrers sorted by credit count in descending order. If two referrers have the same count, sort them alphabetically. Format each entry as "Name count".
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.