Facebook Phone Screen - SE - Full Stack [REJECT]

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-04-27Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Given a list of employee ID, start time, end time:
{[3333, 10, 15], [5674, 12, 17], [4343, 20, 30], [8765, 15, 30]},
write a function so that in each time there a specific number of employees working.

Input:
{[3333, 10, 15], [5674, 12, 17], [4343, 20, 21], [8765, 21, 30]}

Output:
{[1, 10, 15], [2, 15, 17], [3, 17, 20], [2, 20, 21], [1, 21, 30]}

Output Explanation:
[count, start time, end time]

Count stands for number of employees that can work in one shift (start and end time).

Comments