Design a Sliding-Window Event Stream Processor with Checksum Validation and Average Payload Length
Design an event processor for an unbounded stream where each event has an id, timestamp, payload string, and checksum, with events potentially arriving out of order. Validate events by checksum, drop late events beyond a 60-second window, handle duplicates, and continuously maintain the average payload length over the latest 60 seconds in O(n log n) time across n events.
Asked at:
Box
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid April, 2026
Box
Senior
Design an event processor for an unbounded stream where each event has id, timestamp, payload string, and checksum. Events may arrive out of timestamp order; late events beyond a 60-second window are dropped. Validate events by checksum, then maintain and report the average payload length over the latest 60 seconds. Ensure total time complexity is no worse than O(n log n) across n events and support continuous updates as new events arrive. Describe data structures and late/duplicate handling.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.