</>OfferRetriever
DashboardDiscuss
NEW

Summer Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

14

:

03

:

47

:

18

Get this deal
Back to Dashboard

Employee Referral Program

Medium

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.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCode
LEGAL
POPULAR COMPANIES
GoogleMetaAmazonMicrosoftNetflixStripeUberTikTokBrowse all companies →

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.