Company: Stripe
Difficulty: easy
Deployment Window Scheduler Teams ship changes to services all the time. To keep production stable, deploys are not allowed to happen whenever someone feels like it - a scheduler enforces a few practical rules instead. Time format and window representation Time is an integer minute_of_week in the range [0, 10079] , meaning "minutes since Monday 00:00". For example 0 is Monday 00:00, 60 is Monday 01:00, 1440 is Tuesday 00:00 and 10079 is Sunday 23:59. A window is written start,end,type . It includes start and excludes end , so the window 10,12 covers minutes 10 and 11 only. There are two kinds of window: an allowed window, in which a team is permitted to deploy; a freeze window, set while an incident is ongoing, in which nobody may deploy. Windows of the same kind may overlap each other freely, and a freeze window may overlap an allowed window in any way. The task A minute is deployable if it is inside at least one allowed window and inside zero freeze windows. The scheduler wants to pr