1. You receive a stream of events and need to return the top 10 most frequent event types every minute. How would you design this in Python?
Interview promptStrong signal
Looks for Counter or heap usage, streaming trade-offs, memory bounds, and update complexity.
Follow-up probes
- •How would this change if the stream is too large for memory?
- •What would you test first?
Red flags
- •Sorts the full dataset every time without discussing cost.
- •Ignores memory growth or late-arriving events.