Bloomberg | SSE | virtual onsite | System Design
2229
Jul 16, 2022
I was asked to design a rule based alert system.
Rules can be configured like below:
- If price of A stock goes higher than a threshold then send alert
- If price of A stock goes lower than a threshold then send alert.
Apart for the system design. I gave below approach for implementing alert trigger logic.(that I could think of at that moment)
keep the rules with sorted value of price threshold.
then for each price change do a binary search to trigger all the rules above and below that point.
please suggest any better approach.
Comments (4)


