Time: 45 mins
We’re given:
• max_count (threshold, integer).
• period_s (time window in seconds, integer).
• Function signature: bool event(int64_t time_s);
Events arrive in real time at some Unix timestamp (time_s in seconds).
Each time an event arrives:
We need to decide whether the event rate in the last period_s seconds exceeds
• If yes → return true.
• Otherwise → return fal
Once i completed above ques, he asked two more follow up ques, coded both of them successfully.
Got a strong hire feedback, but unfortunately, since that role got closed so recruiter said she wouldnt be able to schedule onsites for now, we will have to wait for sometime, its been one month already.
I feel hopeless since even after performing so well in phone screen, my candidature was dropped.


