Loading Company...
This is a verified interview question from Code-with-cisco. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Online Auction Sniper Detector" covers key patterns like Other.
"Given an array of bids with timestamps and user IDs, determine if the current bid is part of a suspicious window and if the second window is ending at the current timestamp. A suspicious window is defined as a window of length `n` seconds where the user has at least `k` bids. The second window is ending at the current timestamp if there are at least `k` bids from the same user within the last `n` seconds."
Join thousands of developers practicing for Code-with-cisco.