Referral Program Leaderboard

Design a referral program leaderboard with relational support such that if A refers B, and B refers C, C's count adds to both A and B. Implement an efficient method to query the top 3 in the leaderboa...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: