InterviewDB
Question
Top Events - Rank and Return Most Popular Events by Attendance
phone
Question Details
Problem You have a stream of event attendance records {event_id, user_id, timestamp}. Implement a class that supports: record(event_id, user_id, timestamp) - log an attendance entry. top_k(k, start_ts, end_ts) -> List[str] - return the top k event IDs by unique attendee count within the time range, sorted by count descending; break ties by event_id ascending. Example: Follow-ups How do you count unique attendees per event efficiently without a full scan? If records can be ingested out of order,…
Full Details
🔒
Unlock all Two Sigma questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a two sigma interview during the phone round.
More Two Sigma Interview Questions
1p3a
Two Sigma Quant Research Intern Onsite Interview Experience and Insights
1p3a
Two Sigma Quant Finance Intern Tech Phone Screen Interview Experience
1p3a
Twosigma QSE/SWE Interview Process for General Hiring
LeetCode
Two Sigma | Quantitative Software Engineer | Apr 2020 [Reject]
LeetCode
#43 Multiply Strings