The technical screen involved building a real-time user session aggregation system from a continuous stream of messaging events. The problem was based on a practical data engineering scenario rather than a traditional LeetCode algorithm.
Interview Details
Coding Phone Screen: Real-Time User Session Aggregation
I was asked to design and implement a system that processes message events generated by Discord users. Whenever a user sends a message to a channel, the backend produces a send_message event containing the user ID, channel ID, and timestamp.
The system needs to continuously monitor these events and produce a new stream of aggregated user sessions. Each session represents a period of messaging activity for a particular user.
Part 1 — Parse Incoming Message Events
The input consists of newline-delimited JSON records, with one event per line. Each record contains the following fields:
event_name: The event type, which is send_message.
timestamp: The time the message was sent, represented as an ISO 8601 timestamp.
user_id: The identifier of the user who sent the message.
channel_id: The identifier of the channel where the message was sent.
The interviewer specified that events would arrive in chronological order. I could also assume there were no missing, duplicated, or corrupted records, so the problem
Unlock Full Details
Create a free account to unlock this interview experience report.