On 9/14 I applied to a mid-level role through a referral and got the OA right away.
Honestly it was long and a total slog. Even using Claude I couldn't get it done.
Problem background:
Stripe needs a scheduler to manage service deployment times. Time is represented as minute_of_week, in the range [0, 10079] (a week has 10080 minutes in total).
Input:
part:"part1"or"part2"inputCsv: an array of strings
Part 1 format:
start,end,type # type = "allowed" or "freeze"
Part 2 format (the first line is different):
utc_now,lead_time,min_continuous_minutes,k # first line
start,end,type,timezone_offset # subsequent lines
Part 1:
Return all deployable windows = allowed windows minus freeze windows.
Part 2:
Extra handling:
- Time zone conversion:
utc = local - offset - Only return windows that satisfy the conditions:
- start time >=
utc_now + lead_time - window length >=
min_continuous_minutes - return at most
kof them
- start time >=
Output a 2D array [[start, end], ...].
That's the original problem, attached above.
Discussion
Loading comments…