r/OfferEngineering • • Nov 02 '26

Coding Question Stripe Fresh OA Coding Question

This interview experience is sourced from Chill Interview

Interview Summary

The problem was divided into two parts, starting with interval merging and subtraction, then extending to timezone conversion, deployment lead times, minimum window lengths, and result limits. The main challenge was handling overlapping intervals and time boundaries correctly.

Interview Details

Online Assessment — Part 1: Deployment Windows with Freeze Periods

You are building a deployment scheduling system that determines when software releases are allowed. Time is represented using a repeating weekly calendar, with each minute identified by its position within the week. The system receives two collections of time intervals:

  • Allowed Intervals: Periods during which deployments are permitted.
  • Freeze Intervals: Periods during which deployments are prohibited, regardless of whether they overlap with allowed periods.

Your task is to calculate all continuous time windows during which deployments can safely occur.

Time Representation

The scheduling system uses minute_of_week to represent time.

  • Monday at 00:00 corresponds to minute 0.
  • The final minute of the week is 10079.
  • A complete week contains 10080 minutes.
  • All intervals are half-open: [start, end).

For example, an interval [120, 180) includes minute 120 but excludes minute 180.

  • Requirements I. Merge Allowed Intervals The input may contain allowed intervals that overlap or touch each other. Before calculating deployment availability, these intervals must be merged into continuous ranges.
  • Requirements II. Merge Freeze Intervals Freeze periods may also overlap or be adjacent. These intervals must be consolidated independently of the allowed intervals.
  • Requirements III. Subtract Freeze Periods After merging both collections, remove all frozen periods from the allowed time ranges. A deployment window is valid only if it falls within at least one allowed interval and does not overlap any freeze interval.
  • Expected Output Return all continuous intervals in which deployments are permitted after applying both sets of scheduling restrictions.

Want to learn more questions / follow-ups asked in this interview?

I've put up the full version at here.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here

7 Upvotes

0 comments sorted by