Sliding-Window Chat Analytics: Recent Counts, Live Sessions, Out-of-Order Events
Company: OpenAI
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: A three-part coding exercise: build an in-memory chat analytics service that counts each chat's interactions in a closed 15-minute sliding window, tracks each user's live sessions from touch and close events, and stays correct when events arrive out of order. It tests bounded-memory eviction, efficient updates and queries, and exact window and ordering semantics.
Read the full OpenAI Software Engineer interview experience this question came from