Software Engineer • Mid-Level
Software Engineer • Mid-Level
High QualityPrep Other Coding Questions Asked by Stripe
Continue with targeted prep from Stripe's coding question bank.
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
10080minutes. - 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
Unlock Full Details
Create a free account to unlock this interview experience report.