Reported interview periodJan 2026
Live Audio Room Analytics
Events have (operation, room_id, user_id, timestamp), where operation is create, join, or leave. Creating a room also places that user inside it.
Practice focusImplement a batch function that returns total person-seconds per room and a live tracker that ranks rooms by current participant count: For batch processing, sort by timestamp and ignore exact duplicate events. A user may occupy only one room: joining another closes the previous stay at that timestamp. Rejoining the same room is a no-op, and an unmatched leave is ignored. Open stays count through current time when supplied; otherwise they contribute nothing. Live top-k breaks count ties by room ID.…