Design a chat system that records conversations and returns the most active users.
Unlock detailed company stats for this questionUpgrade
Support two APIs: one registers a conversation event between two users at a specific timestamp, and the other returns the most active users. A user's activity is the number of unique users they have had conversations with; each conversation between a pair of users is counted only once.
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
