Count events in a time window with unsorted duplicate timestamps
You are given a list of event timestamps timestamps (unsorted, duplicates allowed). Implement a query(start, end) method that returns how many events occurred within the time window [start, end]...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
