Google | WSE | Meeting slot where everybody is free
Anonymous User
2688

The following is a block structure, representing a single meeting appointment:

class block:
    person: int # Person ID
    startTime: int # Meeting Start Time 
    endTime: int # Meeting End Time

Given an array of meeting blocks for each person, need to find out time slots when everybody is free
Time slots are in range 1 - D, and we can return 0 if there are no available slots

Input:
Array of blocks = [(1, 4, 5), (1, 1, 5), (2, 2, 6), (3, 8, 9), (3, 2, 4)]
D = 10

Output:
Slots = [7, 10]

Explanation
7th hour and 10th hour is available for everyone, as no body is busy.

Comments (10)