Count Events in a Trailing 15-Minute Window with a Fixed-Size Ring Buffer
Company: OpenAI
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: hard
Interview Round: Onsite
Overview: Implement an event counter that returns how many events occurred in the trailing 15 minutes, using a fixed-size ring buffer of per-second buckets so memory stays bounded at any event rate. It tests circular buffers, stale-slot detection, window boundaries, late events and thread safety.