Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Maintain a dynamic registry of customers with unique IDs and evolving total revenue.
Process direct registrations and referral-based registrations where referrers earn credit from referred earnings.
Query the system for the top K customers whose total revenue meets a specified threshold.
What This Tests
Dynamic state management with frequent value updates
Efficient ordering and retrieval using priority structures
Hash map usage for constant-time ID and record access
Filtering and ranking logic under time constraints
Common Patterns
Heap / Priority Queue
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected