FastPrepDeployment Window Scheduler
Problems/Deployment Window Scheduler

Deployment Window Scheduler

Stripe logoStripe● HardINTERNNEW GRADFULLTIMEOA

Updated Dec 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: 🐿️ This practice version is about a 90% match to the available source. The minute-of-week model, half-open windows, allowed-minus-freeze logic, UTC offset conversion, lead time, minimum continuous duration, and next-k window objective come directly from the source. The original callable signature, complete Part 2 CSV example, exact numeric bounds, and week-boundary behavior were not shown, so FastPrep filled those details in consistently without changing what the original question asks you to build.

Special thanks: 🌷 A special thank you to our lovely, amazing frenz who shared that this question appeared again on September 8, 2026, September 11, 2026, September 13, 2026, September 17, 2026, September 20, 2026, September 22, 2026, September 30, 2026, October 5, 2026, October 6, 2026, October 24, 2026, November 5, 2026, November 13, 2026, November 14, 2026, November 15, 2026, and November 30, 2026! (˶ᵔ ᵕ ᵔ˶) 💜

At Stripe, teams ship changes to services all the time. To keep production stable, the Service Deployments team runs a scheduler that decides when deployments are allowed.

Time Format and Window Representation

Time is represented as 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.

Every window is represented as start_minute,end_minute and is half-open: it includes start_minute and excludes end_minute. For example, 10,12 covers minutes 10 and 11.

Implement scheduleDeploymentWindows. The value of part selects one of the following two stages, and inputCsv contains the corresponding CSV rows. Return the resulting deployment windows as [[start, end], ...], sorted by start time.

Part 1: Allowed Windows (Tests 1–4)

A team defines the times of the week when deployments are allowed. During an incident, the Service Deployments team can also define freeze windows that prevent deployments.

A minute is deployable only when it is inside at least one allowed window and inside no freeze window. Compute the week's sorted, continuously deployable windows.

For Part 1, part is "part1", and every row in inputCsv has this format:

start,end,type

The type is either allowed or freeze. Allowed windows may overlap, freeze windows may overlap, and adjacent deployable intervals are returned as one continuous window.

Part 1 Example

part1
540,600,allowed
570,585,freeze

The deployable output is [[540,570],[585,600]].

Part 2: Time Zones and Minimum Duration (Tests 5–11)

The scheduler now aggregates windows from teams around the world. Each window may use a different local time zone, but all rows contribute to one global calendar and the result must be returned in UTC.

For Part 2, part is "part2". The first row of inputCsv contains:

utc_now,lead_time_minutes,min_continuous_minutes,k

Each remaining row has this format:

start,end,type,timezone_offset_minutes

The window endpoints are local minute_of_week values for that row's time zone, where local = UTC + timezone_offset_minutes. Convert every window to UTC, normalizing over the 10080-minute week. If a converted interval crosses the weekly boundary, split it at the boundary.

After conversion, a minute is deployable when it is inside at least one allowed window and inside no freeze window. A returned UTC window must:

  • start no earlier than utc_now + lead_time_minutes;
  • remain continuously deployable for at least min_continuous_minutes;
  • end no later than minute 10080.

Clip deployable intervals to the earliest permitted start, discard any remaining interval that is too short, sort the surviving UTC intervals by start time, and return at most the first k. Return fewer than k windows when fewer valid windows exist.

Function

scheduleDeploymentWindows(part: String, inputCsv: String[]) → int[][]

Examples

Example 1

part = "part1"inputCsv = ["540,600,allowed","570,585,freeze"]return = [[540,570],[585,600]]

Part 1. The freeze interval removes [570,585) from the allowed interval [540,600).

Example 2

part = "part2"inputCsv = ["1020,0,10,5","540,600,allowed,-480","550,565,freeze,-480"]return = [[1020,1030],[1045,1080]]

Part 2. The offset converts the allowed interval to [1020,1080) and the freeze interval to [1030,1045). Both remaining windows are at least 10 minutes long.

Constraints

  • Weekly minute values are normalized over a 10080-minute week.
  • All intervals are half-open.
  • Window rows use type allowed or freeze.

Source note: The images from the original report show the complete two-part prompt and its example walkthrough.

More Stripe Online Assessment questions

  • Request Routing SystemOA · Seen Nov 2026
  • Subscription and Usage-Based Billing CalculatorOA · Seen Nov 2026
  • Split Tender Part 4 - RefundsOA · PHONE SCREEN · Seen Nov 2026
  • Split Tender Part 3 - SurchargesOA · Seen Nov 2026
  • Split Tender Part 2 - Expiration DatesOA · Seen Nov 2026
  • Split Tender Part 1 - Basic Split TenderingOA · Seen Nov 2026
  • Asynchronous Event ProcessingOA · Seen Nov 2026
  • Payment Partner RoutingOA · Seen Nov 2026
  • Financial Account LedgerOA · PHONE SCREEN · Seen Nov 2026
  • Maximum Game Score with Fixed Forward JumpsOA · Seen Nov 2026

Similar questions at other companies

  • Worker Management (Promotion Track), Part 4: Full-Shift Double PayAirbnb · OAAirbnb interview questions
  • Worker Management, Part 4: Double-Paid IntervalsAnthropic · OAAnthropic interview questions
  • Track Received Byte RangesRoblox · OARoblox interview questions
  • Worker Management with Promotions and Double-Paid TimeInstacart · ONSITE INTERVIEWInstacart interview questions
  • Intervals with Exactly One Person OnlineGoogle · ONSITE INTERVIEWGoogle interview questions
  • Query Weekly Store Opening HoursApple · PHONE SCREENApple interview questions
  • Longest Uninterrupted Work BlockIntuit · PHONE SCREENIntuit interview questions
  • Calendar Event System with Pagination and IntersectionLead Bank · ONSITE INTERVIEWLead Bank interview questions
  • Power Cell BankOptiver · OAOptiver interview questions
  • Four-Level Banking System with Scheduled PaymentsZipRecruiter · OAZipRecruiter interview questions

Interview reports that mention this question

  • Stripe OA: What It Tests (2026)

Stripe interview experiences

  • Stripe New Grad SWE OA and Phone Screen: 2 Experiences
  • Stripe Experienced SWE OA and Onsite Questions: 3 Experiences
  • Stripe SWE Intern Linked Merchants Team Screen: 1 Experience
  • Stripe SWE Onsite over Two Days: 1 Experience
  • Stripe New Grad SWE Phone Screen and Onsite: 2 Experiences
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public int[][] scheduleDeploymentWindows(String part, String[] inputCsv) {
      // write your code here
    }

}
Checking account…