Detect bid sniping on an auction site using a sliding time window.
Unlock detailed company stats for this questionUpgrade
Bid sniping detection on an auction site: for each incoming bid in chronological order, determine (1) whether the current user now has at least K bids within the last W seconds (sliding time window), and (2) the smallest user ID that currently qualifies as sniping at that moment.
Core idea: a sliding window per user plus a multiset/ordered structure of currently-sniping user IDs, updated as windows slide.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
