← 返回 stripe 的题目列表Email Notification Scheduler
类型:online_judge
Design and implement an Email Notification Scheduler.
The system receives scheduling requests, each with:
userId
notificationType
sendAt (scheduled time)
payload
Implement the scheduling logic so that as time advances you can output which emails should be sent now. Common follow-ups (as specified by the interviewer) include:
de-duplication/merging for the same user + type within a time window
per-user rate limiting
ordering when multiple tasks share the same sendAt
out-of-order arrivals, cancellation/updates (if required)
Requirement: justify your data structures and handle corner/edge cases.
Note: Exact I/O and rules were not provided in the post; this is a reconstructed version suitable for practice.