Design a chat system that records conversations and returns the most active users.
Unlock detailed company stats for this questionUpgrade
Two APIs: one registers a conversation event between two users at a specific timestamp; the other returns the most active users. Active means the user who has had conversations with the highest number of unique users; each conversation between a pair of users is counted only once. Follow-up: return the top K most active users.
Expect follow-ups like
- Return the top K most active users.
- Is your unordered_map-based solution thread-safe, and how would you handle concurrency?
Format · Google L4 preliminary interview.
Community answers
No answers contributed by the community yet.
Related questions
Design a tracker that records positions for a car and returns its most recent positions.Implement a chat log processor that returns the most active user.Design a returns solution for Shopify, considering that most users look for return policies.Related courses

Course

Course
Course
