2 September 2026 · Advanced track
Busiest Dispatch Window
Find which fixed-length dispatch window received the most delivery requests.
A drone delivery hub logs the minute-of-day each delivery request comes in, from 0 to 1439. Requests are grouped into dispatch windows of a fixed length in minutes, starting from minute 0. For each request, find which window it falls into by dividing its time by the window length and dropping any remainder. Count how many requests fall into each window. Return the window with the most requests, as a tuple `(window_index, count)`. If two or more windows tie for the most requests, return the one with the smallest window index.
Constraints
request_times is a non-empty list of integers from 0 to 1439 inclusivewindow_minutes is a positive integerMultiple requests can share the same exact timeIf multiple windows tie for the highest count, return the one with the smallest window index
Function signature
def busiest_dispatch_window(request_times, window_minutes):