Idle Skills Per Query Window

Asked at Amazon · Coding Questions · Difficulty: Medium

There are `num_skills` skills (`1..num_skills`). `request_logs[i] = [skill_id, timestamp]` records a request. For each `query_times[q]`, count the skills that received **no** request in the closed interval `[query_times[q] - time_window, query_times[q]]`. Return the list of counts.

Loading the problem…