Your question is Max Overlap Days Out of Office. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Deem's travel tools store each employee's travel as an inclusive interval from an in date to an out date. Given two employees' travel schedules, find the maximum number of consecutive calendar days during which both employees are away from the office.
A schedule may contain overlapping or adjacent trips. Treat adjacent trips as one continuous away period. If the employees are never away at the same time, return 0.
Implement max_shared_away_days(schedule_a, schedule_b).
schedule_a and schedule_b are lists of two-element lists.[in_date, out_date], where both values are strings in YYYY-MM-DD format.in_date <= out_date.def max_shared_away_days(schedule_a, schedule_b):