Tap here to switch tabs
Problem
Ask
Submissions

Problem: Employee Free Time

hard
40 min
Explore how to determine common free time across multiple employee schedules by merging and analyzing intervals. Learn to implement solutions that identify finite free periods from sorted, non-overlapping intervals, preparing you for interval-related coding interview questions.

Statement

You’re given a list containing the schedules of multiple employees. Each person’s schedule is a list of non-overlapping intervals in sorted order. An interval is specified with the start and end time, both being positive integers. Your task is to find the list of finite intervals representing the free time for all the employees.

Note: The common free intervals are calculated between the earliest start time and the latest end time of all meetings across all employees.

Constraints:

  • 11 \leq schedule.length , schedule[i].length 50\leq 50

  • 00 \leq interval.start < interval.end 108\leq 10^8, where interval is any interval in the list of schedules.

Tap here to switch tabs
Problem
Ask
Submissions

Problem: Employee Free Time

hard
40 min
Explore how to determine common free time across multiple employee schedules by merging and analyzing intervals. Learn to implement solutions that identify finite free periods from sorted, non-overlapping intervals, preparing you for interval-related coding interview questions.

Statement

You’re given a list containing the schedules of multiple employees. Each person’s schedule is a list of non-overlapping intervals in sorted order. An interval is specified with the start and end time, both being positive integers. Your task is to find the list of finite intervals representing the free time for all the employees.

Note: The common free intervals are calculated between the earliest start time and the latest end time of all meetings across all employees.

Constraints:

  • 11 \leq schedule.length , schedule[i].length 50\leq 50

  • 00 \leq interval.start < interval.end 108\leq 10^8, where interval is any interval in the list of schedules.