Skip to main content
All Questions

Design a stock price jump alert system with rolling windows.

Unlock detailed company stats for this questionUpgrade

The broker gets a price update from the exchange every second. A user can subscribe to be alerted when a stock jumps by X% within a rolling window of their choice (minute, hour, day, week, month or year, each configurable only as 1 unit, like 1 day or 1 month). The window rolls relative to the current timestamp rather than calendar boundaries. A subscription is removed once triggered once or expired (not triggered in 1 month). Focus areas were architectural trade-offs and non-functional requirements like storage size and latency.

Expect follow-ups like

  • A subscription is removed once triggered once or expired (not triggered within 1 month); the rolling window (minute to year) is relative to the current timestamp, not calendar-aligned.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.