Katkat

Compute max events in any 60-second window

Marshall WaceSoftware Engineer · Onsite

Last updated

This question evaluates understanding of timestamp and array processing, sliding-window or two-pointer techniques, and the ability to analyze time and space complexity when counting events within fixed-size intervals.

Design a function that, given a non-decreasing list of integer timestamps (seconds), returns the maximum number of events occurring within any contiguous 60-second window (inclusive). Aim for an O(n) time, O(

  1. extra-space solution.