Search
⌘K

Leetcode 759. Employee Free Time

Given each employee's list of working intervals, compute the finite time intervals when every employee is free by merging/combining overlapping busy intervals across multiple sorted lists and reporting the gaps; this typically uses interval-merge or sweep-line (heap) techniques to handle overlaps across employees.

Asked at:

P

Procore

Amazon

Amazon

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late January, 2026

P

Procore

Senior

Late January, 2026

Amazon

Amazon

Staff

Its a variant of employee free time, where instead of finding the free time given employee oncall timings, we have to find intervals where emloyees are oncall. for example, lets say user1 - [1,10], user2 - [5,7], user3-[6,11] we have to give out like 1-5 = user1 oncall 5-6 = user1, user2 oncall 6-7 = user1, user2, user3 oncall 7-10 = user1, user3 oncall 10-11 = user3 oncall we can use line sweep method by sorting the all start and end times for this by maintaining a set of current oncall and adding and removing the user from set when start or end time comes

Late December, 2024

Google

Google

Mid-level

Employee Free Time

Comments

Your account is free and you can post anonymously if you choose.