Your question is Peak Event Window by Duration. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an array of integer timestamps timestamps and an integer window_size, return the inclusive start and end timestamps of a window of length window_size that contains the maximum number of events. If multiple windows contain the same maximum number of events, return the one with the earliest start time. The input timestamps may be unsorted and may contain duplicates.
def peak_traffic_window(timestamps, window_size):