Design user communication functions
Akuna CapitalSoftware Engineer · Online AssessmentLast updated
This interview question evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer for Design user communication functions states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Question
Design a simple in-memory communication manager for users. Implement 2–3 functions to (
- connect two users so they can communicate, (
- disconnect two previously connected users, and (
- clear all existing user communications. Describe your data structures, provide code, and analyze time/space complexity.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.